Leminiscate Polygon

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10430
Joined: Fri Feb 19, 2010 10:17 am

Leminiscate Polygon

Post by richmond62 »

Just an incarnation of Mark Waddingham's post in the Use-List:
-
SShot 2021-11-03 at 10.35.58.png
-

Code: Select all

on mouseUp
   put 200 into A
   put 1 into PLINE
   repeat with t = -pi to pi step (2*pi / 720)
      put (220 + (A * cos(t) / (1 + sin(t)^2))) into X
      put (220 + (A * sin(t) * cos(t) / (1 + sin(t)^2))) into Y
      put X, Y into line PLINE of fld "fPOINTS"
      add 1 to PLINE
   end repeat
   set the points of grc "WIGGLE" to fld "fPOINTS"
end mouseUp
Attachments
Lemmy.livecode.zip
Here's the stack.
(18.96 KiB) Downloaded 227 times
stam
Posts: 3214
Joined: Sun Jun 04, 2006 9:39 pm

Re: Leminiscate Polygon

Post by stam »

richmond62 wrote: Wed Nov 03, 2021 9:38 am Just an incarnation of Mark Waddingham's post in the Use-List:
Very nice, thank you for sharing Richmond!
Throw a 'lock screen' in there and it's near instantaneous
Post Reply