RP
Ronaldo Persiano
Mon, Nov 21, 2016 5:28 PM
Correction: the surface is composed of three rectangular and two triangular
patches.
Correction: the surface is composed of three rectangular and two triangular
patches.
R
runsun
Mon, Nov 21, 2016 8:29 PM
@Ronaldo,
What formula did you apply to obtain a triangular Bezier patch? I haven't
got to adventure beyond Bezier curves before I was distracted away from
OpenSCAD.
Btw, with your success of the bifurcation above, I think it's very close to
making a full hand --- instead of trying to come up with a poly of multiple
mouths, it should be easier to stitch multiple of above figures into one
hand of 5 fingers.
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text , triang ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf )
--
View this message in context: http://forum.openscad.org/Can-you-sweep-a-object-with-fingers-tp19057p19300.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
@Ronaldo,
What formula did you apply to obtain a triangular Bezier patch? I haven't
got to adventure beyond Bezier curves before I was distracted away from
OpenSCAD.
Btw, with your success of the bifurcation above, I think it's very close to
making a full hand --- instead of trying to come up with a poly of multiple
mouths, it should be easier to stitch multiple of above figures into one
hand of 5 fingers.
-----
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text , triang ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf )
--
View this message in context: http://forum.openscad.org/Can-you-sweep-a-object-with-fingers-tp19057p19300.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
R
Ronaldo
Mon, Nov 21, 2016 9:08 PM
What formula did you apply to obtain a triangular Bezier patch? I haven't
got to adventure beyond Bezier curves before I was distracted away from
OpenSCAD.
What do you mean by formula? Triangular Bezier patches are defined by a
triangular array of control points. To evaluate a point in it, I apply its
recursive evaluation definition (Casteljau). To generate a triangular mesh I
evaluate it in a regular triangular grid of the parameters. And to display
it I pass the list of triangles of the triangular evaluation mesh to
polyhedron. All done by a set of small functions.
Btw, with your success of the bifurcation above, I think it's very close
to making a full hand --- instead of trying to come up with a poly of
multiple mouths, it should be easier to stitch multiple of above figures
into one hand of 5 fingers.
Yes, I know it but then the "hand" will be subdivided by lot of patches and
all the stuff will be harder to assemble. What I want is a general scheme
that works with a n-furcation so to speak: given n mouths it computes the
n-furcation. Using the scheme I sketched, in a 5-furcation, I will need to
compute two pentagonal C1 patches. That patches could be naturally split in
triangles. However, the C1 interpolation methods for arbitrary
triangulations are harder to compute and have many limitations. I am still
researching this.
--
View this message in context: http://forum.openscad.org/Can-you-sweep-a-object-with-fingers-tp19057p19306.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
runsun wrote
> What formula did you apply to obtain a triangular Bezier patch? I haven't
> got to adventure beyond Bezier curves before I was distracted away from
> OpenSCAD.
What do you mean by formula? Triangular Bezier patches are defined by a
triangular array of control points. To evaluate a point in it, I apply its
recursive evaluation definition (Casteljau). To generate a triangular mesh I
evaluate it in a regular triangular grid of the parameters. And to display
it I pass the list of triangles of the triangular evaluation mesh to
polyhedron. All done by a set of small functions.
> Btw, with your success of the bifurcation above, I think it's very close
> to making a full hand --- instead of trying to come up with a poly of
> multiple mouths, it should be easier to stitch multiple of above figures
> into one hand of 5 fingers.
Yes, I know it but then the "hand" will be subdivided by lot of patches and
all the stuff will be harder to assemble. What I want is a general scheme
that works with a n-furcation so to speak: given n mouths it computes the
n-furcation. Using the scheme I sketched, in a 5-furcation, I will need to
compute two pentagonal C1 patches. That patches could be naturally split in
triangles. However, the C1 interpolation methods for arbitrary
triangulations are harder to compute and have many limitations. I am still
researching this.
--
View this message in context: http://forum.openscad.org/Can-you-sweep-a-object-with-fingers-tp19057p19306.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
R
runsun
Mon, Nov 21, 2016 9:51 PM
@Ronaldo, That's good enough for me for now. Thx for the explanation.
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text , triang ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf )
--
View this message in context: http://forum.openscad.org/Can-you-sweep-a-object-with-fingers-tp19057p19308.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
@Ronaldo, That's good enough for me for now. Thx for the explanation.
-----
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text , triang ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf )
--
View this message in context: http://forum.openscad.org/Can-you-sweep-a-object-with-fingers-tp19057p19308.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
R
Ronaldo
Mon, Nov 21, 2016 10:27 PM
Any way, if someone wants to play with triangular patches here are my codes
to start with:
// Tpatch is any triangular array of 3D points
// an example of a degree 3 Bezier Tpatch control points
p = 10*[ [ [0,0,3] ],
[ [1.5,0.5,5], [1.5,2.5,6] ],
[ [3,0,3], [3.5,1,3], [3,3,3] ],
[ [4,-1,3], [5,1.5,1], [4.5,4.5,1], [4,6,3] ] ];
n = 10;
justTpatch = false; // set true to see a solid (manifold) model
// Bezier Tpatch mesh
btp = Bezier_Tpatch_mesh(p,n);
// Bezier Tpatch converted to polyhedron data format
bp = Tpatch2polyhedron(btp,inv=true);
// three polygons meeting the Bezier Tpatch borders
p1 = polygon2polyhedron(concat([[0,0,0]], [for(q=btp) q[0]]));
p2 = polygon2polyhedron(concat([[0,0,0]], [for(q=btp)
q[len(q)-1]]),inv=true);
p3 = polygon2polyhedron(concat([[0,0,0]], btp[len(btp)-1]));
if(justTpatch)
color("red") make_polyhedron([bp]);
else
make_polyhedron([ bp,p1,p2,p3 ]);
// evaluates a Bezier Tpatch with control points p in a parameter space
point (u,v)
function Bezier_Tpatch_eval(p,u,v,degree=3) =
let( l = $from==undef? [0,0]: $from,
i = l[0], j = l[1], w = 1-u-v )
degree==1?
up[i][j] + vp[i+1][j] + wp[i+1][j+1] :
uBezier_Tpatch_eval(p,u,v,degree-1,$from=l)
+ vBezier_Tpatch_eval(p,u,v,degree-1,$from=l+[1,0])
+ wBezier_Tpatch_eval(p,u,v,degree-1,$from=l+[1,1]);
// builds a triangular mesh (itself a Tpatch) evaluating the Bezier Tpatch
p
// in a regular triangular grid of size n
function Bezier_Tpatch_mesh(p,n) =
let(degree=len(p)-1)
[ for(i=[n:-1:0]) [ for(j=[n-i:-1:0])
Bezier_Tpatch_eval(p,i/n,j/n,degree) ] ];
// converts Tpatch tp to a polyhedron data [ vertices, tris ] format;
// inv=true reverses the circulation order
function Tpatch2polyhedron(tp, inv=false) =
let( n = len(tp) != 0 ? len(tp) : 0,
vertices = n == 0 ? [] : [ for(l=tp) for(pt=l) pt ],
tris = concat( [ for(i=[0:n-2], j=[0:i], st=i*(i+1)/2 )
inv ? [ st+j, st+i+j+2, st+i+1+j ]:
[ st+j, st+i+1+j, st+i+j+2 ] ] ,
[ for(i=[1:n-2], j=[0:i-1], st=i*(i+1)/2 )
inv ? [ st+j, st+j+1, st+i+j+2 ] :
[ st+j, st+i+j+2, st+j+1 ] ] ) )
[ vertices, tris ];
// converts a polygon poly to a polyhedron data [ vertices, tris ] format;
// inv=true reverses the circulation order
function polygon2polyhedron(poly, inv=false) =
let( vertices = poly,
range = inv ? [len(poly)-1: -1: 0] : [0:len(poly)-1],
facets = [[for(i=range) i ]] )
[ vertices, facets ];
// generates a polyhedron with the surface of a Tpatch p with color c
module show_Tpatch(p,c="yellow") {
q = Tpatch2polyhedron(p);
color(c) make_polyhedron([ q ]);
}
// generates one polyhedron composed by the polyhedron data in list polys
module make_polyhedron(polys, convexity = 10) {
function _accum_sum(l, offs=0, res=[0]) =
len(res) == len(l) ?
res :
_accum_sum(l, offs+l[len(res)-1], concat(res, [
offs+l[len(res)-1] ] ));
vertlist = [for(p=polys, pt=p[0]) pt]; // collect all verts from
polyhedra
vertlens = [for(p=polys) len(p[0]) ]; // number of vertices of each
polyhedron data
acclens = _accum_sum(vertlens); // accumulated sum of the vertex set
sizes to offset face indices
facets = [ for(i=[0:len(polys)-1], f=polys[i][1] ) [ for(v=f)
acclens[i]+v ] ];
polyhedron(
points = vertlist,
faces = facets,
convexity = convexity
);
}
Any way, if someone wants to play with triangular patches here are my codes
to start with:
> // Tpatch is any triangular array of 3D points
>
> // an example of a degree 3 Bezier Tpatch control points
> p = 10*[ [ [0,0,3] ],
> [ [1.5,0.5,5], [1.5,2.5,6] ],
> [ [3,0,3], [3.5,1,3], [3,3,3] ],
> [ [4,-1,3], [5,1.5,1], [4.5,4.5,1], [4,6,3] ] ];
>
> n = 10;
> justTpatch = false; // set true to see a solid (manifold) model
>
> // Bezier Tpatch mesh
> btp = Bezier_Tpatch_mesh(p,n);
> // Bezier Tpatch converted to polyhedron data format
> bp = Tpatch2polyhedron(btp,inv=true);
>
> // three polygons meeting the Bezier Tpatch borders
> p1 = polygon2polyhedron(concat([[0,0,0]], [for(q=btp) q[0]]));
> p2 = polygon2polyhedron(concat([[0,0,0]], [for(q=btp)
> q[len(q)-1]]),inv=true);
> p3 = polygon2polyhedron(concat([[0,0,0]], btp[len(btp)-1]));
>
> if(justTpatch)
> color("red") make_polyhedron([bp]);
> else
> make_polyhedron([ bp,p1,p2,p3 ]);
>
> // evaluates a Bezier Tpatch with control points p in a parameter space
> point (u,v)
> function Bezier_Tpatch_eval(p,u,v,degree=3) =
> let( l = $from==undef? [0,0]: $from,
> i = l[0], j = l[1], w = 1-u-v )
> degree==1?
> u*p[i][j] + v*p[i+1][j] + w*p[i+1][j+1] :
> u*Bezier_Tpatch_eval(p,u,v,degree-1,$from=l)
> + v*Bezier_Tpatch_eval(p,u,v,degree-1,$from=l+[1,0])
> + w*Bezier_Tpatch_eval(p,u,v,degree-1,$from=l+[1,1]);
>
> // builds a triangular mesh (itself a Tpatch) evaluating the Bezier Tpatch
> p
> // in a regular triangular grid of size n
> function Bezier_Tpatch_mesh(p,n) =
> let(degree=len(p)-1)
> [ for(i=[n:-1:0]) [ for(j=[n-i:-1:0])
> Bezier_Tpatch_eval(p,i/n,j/n,degree) ] ];
>
> // converts Tpatch tp to a polyhedron data [ vertices, tris ] format;
> // inv=true reverses the circulation order
> function Tpatch2polyhedron(tp, inv=false) =
> let( n = len(tp) != 0 ? len(tp) : 0,
> vertices = n == 0 ? [] : [ for(l=tp) for(pt=l) pt ],
> tris = concat( [ for(i=[0:n-2], j=[0:i], st=i*(i+1)/2 )
> inv ? [ st+j, st+i+j+2, st+i+1+j ]:
> [ st+j, st+i+1+j, st+i+j+2 ] ] ,
> [ for(i=[1:n-2], j=[0:i-1], st=i*(i+1)/2 )
> inv ? [ st+j, st+j+1, st+i+j+2 ] :
> [ st+j, st+i+j+2, st+j+1 ] ] ) )
> [ vertices, tris ];
>
>
> // converts a polygon poly to a polyhedron data [ vertices, tris ] format;
> // inv=true reverses the circulation order
> function polygon2polyhedron(poly, inv=false) =
> let( vertices = poly,
> range = inv ? [len(poly)-1: -1: 0] : [0:len(poly)-1],
> facets = [[for(i=range) i ]] )
> [ vertices, facets ];
>
> // generates a polyhedron with the surface of a Tpatch p with color c
> module show_Tpatch(p,c="yellow") {
> q = Tpatch2polyhedron(p);
> color(c) make_polyhedron([ q ]);
> }
>
> // generates one polyhedron composed by the polyhedron data in list polys
> module make_polyhedron(polys, convexity = 10) {
> function _accum_sum(l, offs=0, res=[0]) =
> len(res) == len(l) ?
> res :
> _accum_sum(l, offs+l[len(res)-1], concat(res, [
> offs+l[len(res)-1] ] ));
>
> vertlist = [for(p=polys, pt=p[0]) pt]; // collect all verts from
> polyhedra
> vertlens = [for(p=polys) len(p[0]) ]; // number of vertices of each
> polyhedron data
> acclens = _accum_sum(vertlens); // accumulated sum of the vertex set
> sizes to offset face indices
> facets = [ for(i=[0:len(polys)-1], f=polys[i][1] ) [ for(v=f)
> acclens[i]+v ] ];
>
> polyhedron(
> points = vertlist,
> faces = facets,
> convexity = convexity
> );
> }
--
View this message in context: http://forum.openscad.org/Can-you-sweep-a-object-with-fingers-tp19057p19309.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
R
runsun
Tue, Nov 22, 2016 12:44 AM
@Rolnado, Thx you very very much. I'll take a deep look.
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: Bezier , hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text , triang , unit ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf )
--
View this message in context: http://forum.openscad.org/Can-you-sweep-a-object-with-fingers-tp19057p19314.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
@Rolnado, Thx you very very much. I'll take a deep look.
-----
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: Bezier , hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text , triang , unit ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf )
--
View this message in context: http://forum.openscad.org/Can-you-sweep-a-object-with-fingers-tp19057p19314.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
R
runsun
Tue, Nov 22, 2016 4:04 AM
@ Ronaldo: questions about the Bezier Triangular patch:
- how are the control points obtained ?
Consider you have a shape in mind that you want to present it with OpenSCAD.
How is the shape turned into the control points ?
- Is the control points the only thing the generate the whole shape ? My
study of your code so far seems to indicate that. That is, the 3 polys are
all generated from the control points ?
What's interesting is that I have a very similar approach to generate polys
from data sets. My data is like:
data=[ "name", "Part-A"
, "pts", [ P0,P1...]
, "faces", [... ]
, "ops", ops // operations
, "color", ["brown",1]
]
where ops= operations are something like:
[ "transl", [...], "rot", [...], "transl", [... ]]
The data can be treated with a function to "consume" all the ops to generate
the final points. Or, the data can be sent directly to a module called
/Makes( data_list )/ that will make a poly for each data.
One of the great things about this approach is that I can print out a BOM
automatically:
Part-A x2
Part-B x3
...
What haven't been achieved is the joinery between polys that is presented in
your approach.
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: Bezier , hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text , triang , unit ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf )
--
View this message in context: http://forum.openscad.org/Can-you-sweep-a-object-with-fingers-tp19057p19316.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
@ Ronaldo: questions about the Bezier Triangular patch:
1) how are the control points obtained ?
Consider you have a shape in mind that you want to present it with OpenSCAD.
How is the shape turned into the control points ?
2) Is the control points the only thing the generate the whole shape ? My
study of your code so far seems to indicate that. That is, the 3 polys are
all generated from the control points ?
What's interesting is that I have a very similar approach to generate polys
from data sets. My data is like:
> data=[ "name", "Part-A"
> , "pts", [ P0,P1...]
> , "faces", [... ]
> , "ops", ops // operations
> , "color", ["brown",1]
> ]
where ops= operations are something like:
> [ "transl", [...], "rot", [...], "transl", [... ]]
The data can be treated with a function to "consume" all the ops to generate
the final points. Or, the data can be sent directly to a module called
/Makes( data_list )/ that will make a poly for each data.
One of the great things about this approach is that I can print out a BOM
automatically:
Part-A x2
Part-B x3
...
What haven't been achieved is the joinery between polys that is presented in
your approach.
-----
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: Bezier , hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text , triang , unit ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf )
--
View this message in context: http://forum.openscad.org/Can-you-sweep-a-object-with-fingers-tp19057p19316.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
R
Ronaldo
Tue, Nov 22, 2016 1:09 PM
Well, that is a vast subject to be discussed here. I suggest you study some
on line texts on Bezier curve before reading about Bezier triangle patches.
I have just found this one https://pomax.github.io/bezierinfo/ .
Although I have not read it, it seems it covers the basic properties and
concepts. The next step is to understand how to build surfaces by tensor
product. I need to find a good reference for you. After that you will be
able to understand Bezier triangle surfaces.
runsun wrote
- how are the control points obtained ?
Control points are the coefficient of a polynomial. For a cubic curve, you
have 4 of them. For a biquadratic surface, you have 6. Either they are data
input or they are computed in order to get a specific polynomial (like, for
instance, in curve or surface fitting).
Consider you have a shape in mind that you want to present it with
OpenSCAD. How is the shape turned into the control points ?
That is the hard part. The Bezier control points of a curve or surface is a
coarse approximation of the curve segment or surface patch. In an
interactive environment, you change the position of the CPs and see the
result. In OpenSCAD, you need to change coordinates of the CPs and run the
code again. The CPs are a good indicator of the surface shape due to some
properties:
a) the curve segment or surface patch is in the convex hull of its CPs;
b) the curve segment or surface patch interpolates 2 (in case of curves), 3
(in case of Bezier triangles) or 4 (in case of rectangular Bezier patches)
of its CPs.
c) if you lift a CP, all the curve segment or surface patch lifts (except
for the interpolated points) but the lifting effect is greater near the
changed CP;
d) the curve segment or surface patch is tangent to segments or polygons
built from CPs near the interpolation points.
- Is the control points the only thing the generate the whole shape ? My
study of your code so far seems to indicate that. That is, the 3 polys are
all generated from the control points ?
Well, that is a vast subject to be discussed here. I suggest you study some
on line texts on Bezier curve before reading about Bezier triangle patches.
I have just found this one <https://pomax.github.io/bezierinfo/> .
Although I have not read it, it seems it covers the basic properties and
concepts. The next step is to understand how to build surfaces by tensor
product. I need to find a good reference for you. After that you will be
able to understand Bezier triangle surfaces.
runsun wrote
> 1) how are the control points obtained ?
Control points are the coefficient of a polynomial. For a cubic curve, you
have 4 of them. For a biquadratic surface, you have 6. Either they are data
input or they are computed in order to get a specific polynomial (like, for
instance, in curve or surface fitting).
> Consider you have a shape in mind that you want to present it with
> OpenSCAD. How is the shape turned into the control points ?
That is the hard part. The Bezier control points of a curve or surface is a
coarse approximation of the curve segment or surface patch. In an
interactive environment, you change the position of the CPs and see the
result. In OpenSCAD, you need to change coordinates of the CPs and run the
code again. The CPs are a good indicator of the surface shape due to some
properties:
a) the curve segment or surface patch is in the convex hull of its CPs;
b) the curve segment or surface patch interpolates 2 (in case of curves), 3
(in case of Bezier triangles) or 4 (in case of rectangular Bezier patches)
of its CPs.
c) if you lift a CP, all the curve segment or surface patch lifts (except
for the interpolated points) but the lifting effect is greater near the
changed CP;
d) the curve segment or surface patch is tangent to segments or polygons
built from CPs near the interpolation points.
> 2) Is the control points the only thing the generate the whole shape ? My
> study of your code so far seems to indicate that. That is, the 3 polys are
> all generated from the control points ?
Yes, if you have the coefficients of a polynomial it is fully determined.
--
View this message in context: http://forum.openscad.org/Can-you-sweep-a-object-with-fingers-tp19057p19318.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
R
runsun
Tue, Nov 22, 2016 6:02 PM
Thx, Ronaldo. The ref you gave is a great resource.
Will need to get myself familiar with the way a surface be made with CPs.
I'm to some extent quite familiar with Bezier curve:
http://forum.openscad.org/file/n19325/16bm_scadx_demo_smoothPts_demo.png
But those were done with existing points, on which the CPs are made. So it
will take some digging to get to know how the CPs could come first (i.e.,
w/o points of the surface to start with) in the Bezier surface.
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: Bezier , hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text , triang , unit ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf )
--
View this message in context: http://forum.openscad.org/Can-you-sweep-a-object-with-fingers-tp19057p19325.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Thx, Ronaldo. The ref you gave is a great resource.
Will need to get myself familiar with the way a surface be made with CPs.
I'm to some extent quite familiar with Bezier curve:
<http://forum.openscad.org/file/n19325/16bm_scadx_demo_smoothPts_demo.png>
But those were done with existing points, on which the CPs are made. So it
will take some digging to get to know how the CPs could come first (i.e.,
w/o points of the surface to start with) in the Bezier surface.
-----
$ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); $ tips: Bezier , hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text , triang , unit ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf )
--
View this message in context: http://forum.openscad.org/Can-you-sweep-a-object-with-fingers-tp19057p19325.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
RP
Ronaldo Persiano
Tue, Nov 22, 2016 6:17 PM
runsun, the figure you have appended shows a curve interpolating to all
given data points and not a Bezier curve. In fact, I suspect that your
interpolation is made of a set of polynomial curves (a natural spline?) and
not just one polynomial curve as Bezier curves. Bezier curves are
different: they interpolates just the first and last control points and
they are in the convex hull of its control points. In some sense, those
properties are true for Bezier surfaces too. Interpolation techniques have
their value in modelling but its natural "instability" sometimes surprises.
2016-11-22 16:02 GMT-02:00 runsun runsun@gmail.com:
runsun, the figure you have appended shows a curve interpolating to all
given data points and not a Bezier curve. In fact, I suspect that your
interpolation is made of a set of polynomial curves (a natural spline?) and
not just one polynomial curve as Bezier curves. Bezier curves are
different: they interpolates just the first and last control points and
they are in the convex hull of its control points. In some sense, those
properties are true for Bezier surfaces too. Interpolation techniques have
their value in modelling but its natural "instability" sometimes surprises.
2016-11-22 16:02 GMT-02:00 runsun <runsun@gmail.com>:
> Will need to get myself familiar with the way a surface be made with CPs.
> I'm to some extent quite familiar with Bezier curve:
>
> <http://forum.openscad.org/file/n19325/16bm_scadx_demo_smoothPts_demo.png>
>