|
Post by bplus on Mar 1, 2023 20:03:24 GMT -5
Another sb snippet Charlie should be able to easily do on BAM: '_Title "The Hypotrochoid Show" 'for QB64 B+ 2019-07-18 trans to sb 2023-02-26 c2 = RGB(200,0,0) xc = xmax / 2: yc = ymax / 2: r = yc * .5: st = 3 / (2 * Pi * r) n = 0: m = 3 While 1 m = m + 1 For n = 5 To 30 Step .05 Cls k = Inkey ' <<< Good god does this slow things down!!! If k = "q" Then End For a = 0 To 2 * Pi Step st xReturn = xc + r * (Cos(a) + Cos(n * a) / 3 + Sin(m * a) / 2) yReturn = yc + r * (Sin(a) + Sin(n * a) / 3 + Cos(m * a) / 2) Circle xReturn, yReturn, 10, 1, RGB(0, 200, 0) Next Print "m = "; m;" q to quit" ShowPage Next Wend Screenshot hardly does it justice but here is one:
|
|
|
Post by charliejv on Mar 2, 2023 23:20:04 GMT -5
|
|
|
Post by bplus on Mar 3, 2023 5:02:32 GMT -5
Looks OK. I am wondering if there is less circles or the random coloring makes it look less. I was trying to sim a hollow tube but don't have alpha transparency like we do in QB64 so instead of solid circles I used non filled circles.
|
|
|
Post by charliejv on Mar 3, 2023 9:35:02 GMT -5
At first I was going to try a little something for alpha blending to make the thing look more like a transparent tube.
Then I got more interested in the "parts" of the tube than in the tube itself. Seeing as I particularly enjoy seeing the details of the whole, I had to add a little space between the circles to see them.
Then I was getting a sense of elongation of the tube, and I wanted to see the elongation motion. The randomness of the circles gives a little bit of an illusion of the circles moving, so that was good enough for this kid.
|
|