Ellipse Spline

Ellipse Spline

Somebody
complained about a missing ellipse tool, where part of an ellipse is approximated by bezier splines with few control points.
As I was already on the road I wrote this tool.
Start and end angle can be chosen between -360 and 360 degrees. So, if you start with -360° and end with 360° or reverse, you go around twice!

Don't get dizzy!

Herbert



Rev 1: Dez. 20. 2010: Corrected a rounding problem in Javascript

Rev 2: Added parameter "Orientation" to select from "X","Y", "Z"
 

Attachments

  • Ellipse-Spline.jpg
    Ellipse-Spline.jpg
    79.3 KB · Views: 993
  • Bezier_Ellipse_0_2.zip
    1.8 KB · Views: 766
Last edited:
Somebody
complained about a missing ellipse tool, where part of an ellipse is approximated by bezier splines with few control points.
As I was already on the road I wrote this tool.
Start and end angle can be chosen between -360 and 360 degrees. So, if you start with -360° and end with 360° or reverse, you go around twice!

Don't get dizzy!

Herbert

Thanks Herbert.
Very useful script and it works within the the creator hierarchy. :icon_thumbup:
When you go around the whole ratio as you mentioned you´ll get a tiny error like shown in the image. No big deal. ;)

Cheers
Frank
 

Attachments

  • EllipseSpline.jpg
    EllipseSpline.jpg
    93.6 KB · Views: 905
thank's Frank for the positive comment -
I was however not able to reproduce your result.

As you probably know, the spline methods, accessible through javascript, are very limited. However, Martin improved the handling of splines considerably for this version of C3D and so I am in good hope that he will also expose more spline methods to allow more sophisticated spline-scripting.;)


Greetings

Herbert
 
thank's Frank for the positive comment -
I was however not able to reproduce your result.
Hi Herbert.
As I said: no big deal.

I attached a file that will show up what I was talking about. If it´s not - it´s most likely my crap-Mac. :redface:

Cheers
Frank
 

Attachments

  • EllipseBezier.jas.zip
    3.7 KB · Views: 695
Hi Frank,
it was a rounding problem in the "modulo calculation" of javascript, not your Mac! (exchanged the zip in my original post)

By the way, I got a 2 x 2.4 GHz Quad-Core MacPro this summer and it is really a joy to watch C3D using all available power for rendering a scene!:D


Herbert
 
Hi Frank,
it was a rounding problem in the "modulo calculation" of javascript, not your Mac! (exchanged the zip in my original post)

By the way, I got a 2 x 2.4 GHz Quad-Core MacPro this summer and it is really a joy to watch C3D using all available power for rendering a scene!:D


Herbert
Thanks Herbert. :icon_thumbup:
Works like a charme.

Cheers
Frank

PS:(Apple Macs: I´m on it for 20 years now and still have some of the older G3s. I can turn them on and they are "running" is ever - indestructible. But my latest iMac is a whole other story - and 600 bucks for a new graphic/logic board is a questionable bad joke - as Apple will replace it without any guarantee.)
 
I've wanted something like this for a while so thanks for creating it Herb. Looking forward to trying it out!
 
Same to you, Frank!
(needed some quantifiable distraction after restudying Quantum Mechanics:smile:).

Herbert
 
Back
Top