I don't need this...

LucaMs

Expert
Licensed User
Longtime User
Often I try to imagine how it is possible to create certain things.

A "simple" graphic tool can do this, for example:
1.gif



I don't need this in my apps, but I don't know how I could do it.

Many effects are fascinating (as are many algorithms, such as those for chess games and many others).
 

alwaysbusy

Expert
Licensed User
Longtime User
it is all math :D

I once made these just for fun to find out how it worked. In another language, but I stopped working with it because it was/is actually very bad handling graphics. They would be a lot better if I would've known B4J back then...


This one was done in only 100 lines of code:


This was a lot bigger to build ;):

 

Star-Dust

Expert
Licensed User
Longtime User
..and the B4A-magician arrived promptly with an example.
You never never stop to surprise me @Star-Dust :)
Thank you, but it's an algorithm I've been studying at school. We did it in Turbo Pascal and then translated it into VB4. :p:p:p

Now I've only translated it into B4A, so no surprises.;)

Anyway what LucaMs is looking for is called C-Spline. If I find it I translate it too ... but they are too old files, about 20 years ago I do not know if still the Backup CD is still legible o_O

spline%2Bvb6%2B%2528visual%2Bbasic%2B6%2529.gif
 

LucaMs

Expert
Licensed User
Longtime User
... I remember that to draw a line using the Basic of my TI/994a this machine taken about 1h for 200px :p
This is why I'm asking... prev. post.

you draw points and then lines between them
Yes, but there is DrawLine (canvas) to draw a straight line.

do you need an example code?
Yes, thank you, but very little, just a single curve.
 

Star-Dust

Expert
Licensed User
Longtime User
Top