[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[epsilon-devel] Re: draw regular poligons

From: Luca Saiu
Subject: [epsilon-devel] Re: draw regular poligons
Date: Tue, 02 Dec 2003 19:19:03 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.3a) Gecko/20021212

  Hi Matteo.

Matteo Golfarini wrote:
that is the code i implemented in the week end ... i don't know if is the best way for implement it because i forgot my matematics books but i think it's work .......

*REGULAR* polygons? I thought you were implementing *generic* polygons, whose vertices were represented as lists of points... However don't mind, also regular polygons can be useful; and probably they are more difficult to implement than non-filled generic polygons.

  However you forgot the attachment :-).

  About non-filled generic polygons, here are some little hints:
* you can see a segment as the pair of its extreme points (P1, P2). Order does matter, i.e. (P1, P2) is different from (P2, P1). * A polygon is a sequence of "linked" segments. "Linked" means that if the i-th segment is (P1, P2) then the (i-1)-th has P2 as its second extreme point, and the (i+1)-th segment has P2 as its first extreme point. * You can see the list of points as a circular list: the point "before" the first one is the last one. * Draw each segment in order with show_line. The last one, which closes the polygon, requires a very little trick.

now i must go to study a little of spanish, today i've my spanish exam and (for now) i don't speek ...... :)
  Ok. Best wishes, and see you soon.

Luca Saiu, maintainer of GNU epsilon

reply via email to

[Prev in Thread] Current Thread [Next in Thread]