nkh / P5-App-Asciio

Plain ASCII diagram
https://nkh.github.io/P5-App-Asciio/
56 stars 4 forks source link

Cross mode error #2 #56

Closed nkh closed 1 year ago

nkh commented 1 year ago

@qindapao I think these two are not what the user would expect.

cross_bug

cross_bug

qindapao commented 1 year ago

@nkh

I'm already repairing it. Wait, I also found it

And found a way to improve efficiency.

qindapao commented 1 year ago

The first problem is easier to solve, but the second problem is more difficult.

I have a solution, but it's a little complicated. This is what I call a perfect crossing.

I mentioned that Japanese guy to you last time.Do you remember?

qindapao commented 1 year ago

There are two problems at present.

  1. Before the two lines intersect, the filler start generating, which is obviously unreasonable.This problem has been fixed.
  2. Next to an intersection point, there is an intersection point.This situation involves the dynamic consideration of character coverage and judgment algorithm, which I haven't thought clearly yet.So what I said earlier is basically enough, not a perfect cross.
qindapao commented 1 year ago

I have an idea to treat the canvas as a chessboard, and then group the intersection points according to certain rules according to the grid, and generate the fillers by grouping. I am still thinking about the details.

nkh commented 1 year ago

I'm sure you'll fix it. I updated the documentation for the cross mode.

cross_bug2

qindapao commented 1 year ago

60% has been completed.Everything is fine.I still need some time

qindapao commented 1 year ago

@nkh

I have completed the perfect cross mode, and the efficiency has been further improved.

Wait for me to work for another 4 hours to update the document and optimize other details.I am really happy today, which has been bothering me for a month to solve the problem.I'll try to show you the principle clearly.

Please wait for this commit.:)

qindapao commented 1 year ago

@nkh

https://github.com/qindapao/P5-App-Asciio/tree/refactor_cross

The tracking relationship of the branch seems to be messed up, I don't know how to adjust it

Your gifs I updated, because now the crossing only happens when the elements actually cross.

qindapao commented 1 year ago

I modified it with your branch, so it is not tracking your master branch

qindapao commented 1 year ago

@nkh

Regarding the algorithm, I am going to start writing documents. Do you think it is appropriate to write it in the development document or just reply here?

qindapao commented 1 year ago

I have three hours left to work this afternoon.

qindapao commented 1 year ago

@nkh error fix 1

error_fix_1

error fix 2

error_fix_2

error fix 3

error_fix_3

A big change is that to only generate fillers when elements actually crossing, which is reasonable and must not have side effects and ambiguities.

qindapao commented 1 year ago

This is the validation file I use

demo.zip

nkh commented 1 year ago

great work, I'll give it a try later; I'll try to find more bugs for you ;)

nkh commented 1 year ago

"A big change is that to only generate fillers when elements actually crossing", YES!

nkh commented 1 year ago

Some minor and future points.

documentation

when you make these small videos, could you please just take the part that's interesting? That way they can be reused without having to re-make them. I have re-factored the documentation now please also document. it does

fillers

I think the fillers should be removed altogether when objects are converted to normal objects, there's no reason for them to be left. But I wonder if that is not going to be a problem when we make strip-groups out of them.

future integration

When you're done with this we need to discuss where it should be implemented, I believe that it's in the wrong place now, this should be part of the rendering not an extra layer (but that was a good idea which let you develop it separately), that means that being a cross object becomes an attribute of objects instead for a separate mode. I also believe that it will make it possible to profit of the optimizations I made for faster drawing, at least in the GUI.

You brought a lot of good ideas to Asciio!

qindapao commented 1 year ago

https://github.com/nkh/P5-App-Asciio/issues/56#issuecomment-1616421189

fillers The fillers is retained to save the static result after crossover. Of course, we have strip groups, and we can also save the work results. Let's record a todo first, let's use it for a while, how about it?

future integration

I agree, it's too difficult for me to change the core of asciio , so for now this is a workaround intermediate implementation. Definitely not the best implementation.Let's write it in todo.txt. I think the current cross mode is enough.

documentation

Do you think my gifs are too big? I'll make it smaller next time.

nkh commented 1 year ago

fillers

I don't think we need a ticket, when cross mode gets integrated it will be obvious

future integration

I disagree with you, it's a good way to implement it without disturbing the code base, as a proof-of concept it couldn't have been better.

It's not the most efficient but I don't care for efficiency that much and if necessary things can be made more efficient

What we need to do is discuss ideas together more. We need to find a way to do that. Github has discussion but I really would like to not use third party services, I'm already reluctant to using github issues!

documentation

IMO:

Have a look at how I transformed your original videos (you're using mdbook already, right?)

I recommend you take a rest from coding for 15 min and document ;)

qindapao commented 1 year ago

@nkh

https://github.com/nkh/P5-App-Asciio/commit/df929438200ddb81f9debf9af45f93e2282834b9

Here is the documentation for the cross algorithm.

nkh commented 1 year ago

You worked hard on this, good work, I have merged it to my master branch, you can merge it to yours too.

videos

Please please make them better! This time I'll do it again for you so you can diff (I'll send a link), and you understand the difference.

screenshots

The same goes for screenshots (I'll also do that for you)

text documentation

The algorithm doc should have a better title (I'll also do that for you)

enjoy the rest of your day