Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannabis curve
#1
Someone posted this in a facebook group:

Code:
' Cannabis curve
' --------------

set window "Cannabis curve", 640, 480
set redraw off

set color 0, 200, 0
px = 0; py = 0
for a = 0 to PI*2 step 0.01
    x = 320 + 100*(sin(a) + 1)*cos(a)*(9*cos(8*a)/10 + 1)*(cos(24*a)/10 + 1)*(cos(200*a)/10 + 9/10)
    y = 64 + 100*sin(a)*(sin(a) + 1)*(9*cos(8*a)/10 + 1)*(cos(24*a)/10 + 1)*(cos(200*a)/10 + 9/10)
    if a > 0  draw line px, py, x, y
    px = x; py = y
next
redraw

while not keydown(KEY_ESCAPE)  fwait 60

I first tried to put the points in an array and render with 'draw poly', but it crashed. I'll look into that, probably has to do with the point count.

(Yes, still working on the help ...)
Reply


Messages In This Thread
Cannabis curve - by Marcus - 08-07-2022, 10:34 AM
RE: Cannabis curve - by Marcus - 08-07-2022, 10:56 AM
RE: Cannabis curve - by johnno1956 - 08-07-2022, 11:02 AM
RE: Cannabis curve - by Marcus - 08-07-2022, 12:00 PM
RE: Cannabis curve - by Marcus - 08-07-2022, 12:07 PM
RE: Cannabis curve - by kcfb - 08-07-2022, 04:11 PM
RE: Cannabis curve - by Rick3137 - 08-07-2022, 12:17 PM
RE: Cannabis curve - by johnno1956 - 08-07-2022, 09:19 PM
RE: Cannabis curve - by Marcus - 08-08-2022, 04:20 PM
RE: Cannabis curve - by johnno1956 - 08-08-2022, 06:56 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)