Hermite/quadratic bezier curve vs (sin and cos)

  • Thread starter Thread starter arpace
  • Start date Start date
  • Tags Tags
    Cos Curve
arpace
Messages
9
Reaction score
0
So I have a Hermite curve with the control points:

//point# (x,y):

p0 (1,0)
p1 (1,(Math.sqrt(2)-1))
p2 (Math.sqrt(0.5), Math.sqrt(0.5))

I also have the algorithm to find the points on the locus between 0 and 45 degrees:

//L0 is the point on the line between p0 and p1
//L1 is the point on the line between p1 and p2
//Loc is the point on the locus
//...
//keep in mind that although this can be extended with if statements to check for
//any degree with a little modification
//right now, the rule is 0 <= degree <= 45

L0 = p0 + (p1 - p0)*degree/45;
L1 = p1 + (p2 - p1)*degree/45;
Loc = L0 + (L1-L0)*degree/45;

so Shouldn't this, as it is essentially a quadratic Bezier (Hermite) curve representing degrees 0 through 45 of a unit circle , not equal the results of sind(degree) as long as:
0<= degree <= 45 ?


when I use for the degree 22.5, on my windows calculator
sind(22.5) = 0.3826834323650897717284599840304;

...but mine (again using the window calc) at 22.5 degrees is
Loc.y = 0.38388347648318440550105545263106

could this be due to floating point error? Is there something obvious I am missing?

here is an image I made to help with conceptualization
[PLAIN]http://sphotos.ak.fbcdn.net/hphotos-ak-snc4/hs1384.snc4/163638_10100121877154282_28122817_59279302_5323393_n.jpg
 
Last edited by a moderator:
Mathematics news on Phys.org
seriously? no one?
 
A Bezier curve can not be exactly equal to a circle.

Repeat the subdivision process again, and you will see that you a mid-point which is not a unit distance from the origin.

However your splines are a good approximations to a circle, and are often used to draw approximate circles in computer graphics.

FWIW it is possible to represent a circular arc up to a semicircle (or in fact any conic section) exactly using rational functions as splines. Look up the theory of NURBS (non-uniform rational B-splines) if you are interested.
 
Actually, a quadratic rational Bezier curve can exactly reproduce a circular arc and a degree 5 rational Bezier curve can represent an entire circle. There is a formula to figure out the weights for each control point if you're still interested. A NURBS can reproduce any conic section, which makes them so versatile. However, a NURBS is basically a collection of Bezier curves joined together so that they have a specified continuity. If you're interested, there is a whole bunch of information about computer-aided geometric design at http://en.wikiversity.org/wiki/CAGD
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top