Points of Graphic Oval

hh hh at hyperhh.de
Wed Aug 2 13:35:51 EDT 2017


> BR wrote:
>> HH wrote:
>>  A circle is, just like a Bezier curve, a mathematical model, for thinking,
>>  doing mathematics. Not realizable in our virtual world.
>>  What you can have and what you see are (more or less good) approximations
>>  to that model, here nothing more than simple polygons.
> 
> But then, as the circle/oval got bigger one would see 360 "sides" but we don't.
> So, how is it a "simple polygon"

Create a new stack and an oval (=circle) of radius 68 or larger and get
the effective points of it (you need to use LC > 6 for that).
Then create a polygon with these points and increase the width and
height of that graphic to card's size. Then you'll see the 360 sides ...

... IF, yes IF the width and height of the circle is 136 or larger.
ELSE the number of lines of the effective points is less than 360.
Probably because Mark is filtering without duplicate lines --- to your
advantage in case you are going to move along these points list.

on mouseUp
  if there is no grc "demo1" then create grc "demo1"
  set style of grc "demo1" to "oval"
  set width of grc "demo1" to 68
  set height of grc "demo1" to 68
  set loc of grc "demo1" to the loc of this card
  if there is no grc "demo2" then create grc "demo2"
  set style of grc "demo2" to the "Polygon"
  put the effective points of grc "demo1" into ep
  put the number of lines of ep
  set the points of grc "demo2" to ep
  set loc of grc "demo2" to the loc of this card
  set width of grc "demo2" to -100+the width of this card
  set height of grc "demo2" to -100+the height of this card
end mouseUp

Of course the graphics library increases the number of points to draw
an oval whenever the width and height increases, also uses antialiasing
to create the "optical illusion" of a circle.





More information about the Use-livecode mailing list