Hi all;
I have two math functions from which I am interested to generate a CAD model. Attached is a picture for what I am looking for but not sure how to do it. <http://forum.openscad.org/file/t2047/cad_model.png> The border line equations are given and the shaded black region is the one i want to generate. Also note that the third dimension does not matter for me as I am looking at a 2D case. It can be any flexible value. Thanks!!  Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
You need to define a polygon by its vertices. Something like:
This would be the upper part. 20180110 13:32 GMT02:00 Katt <[hidden email]>: Hi all; _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
There was a typo in my previous code. To get a symetrical shape, given the function f defined in the interval [0,1]:
20180110 13:45 GMT02:00 Ronaldo Persiano <[hidden email]>:
_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
Just for completeness, in the dev snapshot version concat() is
not needed for this case anymore. It's enough to simply write: verts = [ for(i=[0:nverts1]) [ scalex*i/nverts, f(i/nverts) ], for(i=[nverts1:1:0]) [ scalex*i/nverts, f(i/nverts) ] ]; ciao, Torsten. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
 Torsten

Here is some code with a function added for the y coord.
<http://forum.openscad.org/file/t1309/poly.jpg>  Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org 
Free forum by Nabble  Edit this page 