Ellipse Spline

Herb

New member
#1
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

Last edited:

frank beckmann

Well-known member
#2
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

Herb

New member
#3
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
 

Herb

New member
#5
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
 

frank beckmann

Well-known member
#6
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.)
 
Top