AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein Ellipsenalgo aus Formelsammlung kreieren
Thema durchsuchen
Ansicht
Themen-Optionen

Ellipsenalgo aus Formelsammlung kreieren

Ein Thema von delphifan2004 · begonnen am 8. Jul 2025 · letzter Beitrag vom 12. Jul 2025
 
Kas Ob.

Registriert seit: 3. Sep 2023
457 Beiträge
 
#22

AW: Ellipsenalgo aus Formelsammlung kreieren

  Alt 9. Jul 2025, 16:26
Step = 1/Sqrt(a^2+b^2)
Like said, it is the sqrt that makes me nervous, but its maybe needed here.
I think it depends a lot on the shape, how to handle it.
For lines, circles, squares, a pre-calculated step will work nicely.
For ellipses and other complex paths, maybe you always need varying step-sizes during drawing.
A overdraw pixel will happen for the suggested above for sure, but it will not affect the drawing, the only enhancement to do is to check if x and y changed from last pixel/point then draw, due to approximation of course, as for dynamic, it will return to the same check no matter what algorithm been used, for more accurate approximation you need to calculate the derivative of the speed of pixel on the slope then divide it by the radius, but not that radius you will calculate from (0,0) the center of the ellipse, this will be more complex for no, benefit visually or not.

the only case when it corrupt drawing is when the ellipse is more like a line then an ellipse, when one of the axis is barely moving while the other taking the full speed for the next step.
Kas
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:16 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz