Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
451 Beiträge
 
#3

AW: Ellipsenalgo aus Formelsammlung kreieren

  Alt Gestern, 11:26
Hi,

You have to distinguish (x,y) from (x0,y0) "ellipse center", you already have (xm,ym) which is (x0,y0).

After than it is easy to draw the pixel (X,Y)
X = x0 + x(angle)
Y = y0 + y(angle)

In other words, the naming of the variables is deceiving you, if it is yp or yn ?!

Another thing: you are drawing both +- values so it will mirrored, use one value (the positive) and walk the angle with refined (small enough) step per radius.
Kas
  Mit Zitat antworten Zitat