[Gmsh] Create a parabola using BSplines

Arnaud Trouche trouche at artenum.com
Tue Apr 28 12:08:59 CEST 2015


Hello,

I'm trying to create a parabola (simple case, of the form y=ax2).
I tried to put on the BSpline : the starting point, the end point and a 
control point that is on the crossing of the tangents of the parabola on 
the starting point and the end point.
Here is the code for a simple curve y=x2 between 0 and 1.

a = 1.0;
x_max = 1.0;

Point(0) = {0,0,0};
Point(1) = {-1/(2*a*x_max)+x_max, 0, 0};
Point(2) = {x_max, a*x_max*x_max, 0};

BSpline(1) = {0, 1 ,2};


But as you can see on the screen shot, the curve is not passing through 
the correct points. Is there a way to produce correct parabolas ? Do you 
think using the tangent is a good idea ?

Thank you,

-- 
Arnaud Trouche
Artenum Toulouse - Science & Groupware
http://www.artenum.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20150428/0a582314/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testSpline.png
Type: image/png
Size: 15320 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20150428/0a582314/attachment.png>