discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Can anyone help me to render my model.

JM
Jaacov Molcho
Mon, Apr 17, 2017 3:20 PM

This is the code I cannot  render:

//        Astroid Pendant
//        =================
a=20;
b=a360/PI;
$fn=6;
function x(t)= a
cos(t)*cos(t)cos(t);
function y(t)= a
sin(t)*sin(t)*sin(t);
module graph(r, step) {
for (t=[-b:step:b]) {
translate([x(t),y(t),0])
render()
rotate([0,90,-90])
//cylinder(2,2,2,true);
sphere(1.5);
} };

graph(3,4);

render()
translate([0,22.5,0])
rotate([0,90,0])
rotate_extrude(convexity = 10)
translate([2, 0, 0])
circle(.5);

//x(t) = r cos(t)^3,
//y(t) = r sin(t)^3,

--
View this message in context: http://forum.openscad.org/Can-anyone-help-me-to-render-my-model-tp21266.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

This is the code I cannot render: // Astroid Pendant // ================= a=20; b=a*360/PI; $fn=6; function x(t)= a*cos(t)*cos(t)*cos(t); function y(t)= a*sin(t)*sin(t)*sin(t); module graph(r, step) { for (t=[-b:step:b]) { translate([x(t),y(t),0]) render() rotate([0,90,-90]) //cylinder(2,2,2,true); sphere(1.5); } }; graph(3,4); render() translate([0,22.5,0]) rotate([0,90,0]) rotate_extrude(convexity = 10) translate([2, 0, 0]) circle(.5); //x(t) = r cos(t)^3, //y(t) = r sin(t)^3, -- View this message in context: http://forum.openscad.org/Can-anyone-help-me-to-render-my-model-tp21266.html Sent from the OpenSCAD mailing list archive at Nabble.com.
K
kitwallace
Mon, Apr 17, 2017 4:07 PM

Jaacov, I've taken the liberty of moding your code a bit:

using hull to join adjacent pairs of spheres
reducing the number of spheres created - only 1 revolution needed
adding a parameter to the graph module to separately control the number of
sides of the astroid

With the given parameters, it renders in a couple of minutes for me

Regards

Chris

//        Astroid Pendant

//        =================
a=20;
function x(t)= a*cos(t)*cos(t)cos(t);
function y(t)= a
sin(t)*sin(t)*sin(t);

module graph(r, step, sides, max=360) {
for (t=[0:step:max]) {
hull() {
translate([x(t),y(t),0])  sphere(r,$fn=sides);
translate([x(t+step),y(t+step),0])  sphere(r,$fn=sides);

   }

}
};

graph(1,4,12);

$fn=6;
render()
translate([0,22.5,0])
rotate([0,90,0])
rotate_extrude(convexity = 10)
translate([2, 0, 0])
circle(.5);

//x(t) = r cos(t)^3,
//y(t) = r sin(t)^3,

--
View this message in context: http://forum.openscad.org/Can-anyone-help-me-to-render-my-model-tp21266p21267.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Jaacov, I've taken the liberty of moding your code a bit: using hull to join adjacent pairs of spheres reducing the number of spheres created - only 1 revolution needed adding a parameter to the graph module to separately control the number of sides of the astroid With the given parameters, it renders in a couple of minutes for me Regards Chris // Astroid Pendant // ================= a=20; function x(t)= a*cos(t)*cos(t)*cos(t); function y(t)= a*sin(t)*sin(t)*sin(t); module graph(r, step, sides, max=360) { for (t=[0:step:max]) { hull() { translate([x(t),y(t),0]) sphere(r,$fn=sides); translate([x(t+step),y(t+step),0]) sphere(r,$fn=sides); } } }; graph(1,4,12); $fn=6; render() translate([0,22.5,0]) rotate([0,90,0]) rotate_extrude(convexity = 10) translate([2, 0, 0]) circle(.5); //x(t) = r cos(t)^3, //y(t) = r sin(t)^3, -- View this message in context: http://forum.openscad.org/Can-anyone-help-me-to-render-my-model-tp21266p21267.html Sent from the OpenSCAD mailing list archive at Nabble.com.
JM
Jaacov Molcho
Tue, Apr 18, 2017 5:05 AM

Thank you very much.I liked your approach.It also gave a smoother finish to the model.
I am using OpenScad to create 3D printed models.You are invited to visit my shop at:http://www.shapeways.com/shops/jacobs
This are some more links to my advertising: 
https://www.youtube.com/watch?v=1lbw6H9tzbkhttps://twitter.com/ymolchohttps://www.instagram.com/ymolcho12/Jaacov Molcho
 

  From: kitwallace [via OpenSCAD] <ml-node+s1091067n21267h13@n5.nabble.com>

To: Jaacov Molcho ymolcho12@yahoo.com
Sent: Monday, April 17, 2017 7:07 PM
Subject: Re: Can anyone help me to render my model.

Jaacov, I've taken the liberty of moding your code a bit:

using hull to join adjacent pairs of spheres
reducing the number of spheres created - only 1 revolution needed
adding a parameter to the graph module to separately control the number of sides of the astroid

With the given parameters, it renders in a couple of minutes for me

Regards

Chris

//         Astroid Pendant

//        =================
a=20;  
function x(t)= a*cos(t)*cos(t)cos(t);
function y(t)= a
sin(t)*sin(t)*sin(t);

module graph(r, step, sides, max=360) {
   for (t=[0:step:max]) {
       hull() {
           translate([x(t),y(t),0])   sphere(r,$fn=sides);
           translate([x(t+step),y(t+step),0])   sphere(r,$fn=sides);
           
       }
   }
};

graph(1,4,12);

$fn=6;
render()
translate([0,22.5,0])
rotate([0,90,0])
rotate_extrude(convexity = 10)
translate([2, 0, 0])
circle(.5);

//x(t) = r cos(t)^3,
//y(t) = r sin(t)^3,

If you reply to this email, your message will be added to the discussion below: http://forum.openscad.org/Can-anyone-help-me-to-render-my-model-tp21266p21267.html  To unsubscribe from Can anyone help me to render my model., click here.
NAML

--
View this message in context: http://forum.openscad.org/Can-anyone-help-me-to-render-my-model-tp21266p21281.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Thank you very much.I liked your approach.It also gave a smoother finish to the model. I am using OpenScad to create 3D printed models.You are invited to visit my shop at:http://www.shapeways.com/shops/jacobs This are some more links to my advertising:  https://www.youtube.com/watch?v=1lbw6H9tzbkhttps://twitter.com/ymolchohttps://www.instagram.com/ymolcho12/Jaacov Molcho   From: kitwallace [via OpenSCAD] <ml-node+s1091067n21267h13@n5.nabble.com> To: Jaacov Molcho <ymolcho12@yahoo.com> Sent: Monday, April 17, 2017 7:07 PM Subject: Re: Can anyone help me to render my model. Jaacov, I've taken the liberty of moding your code a bit: using hull to join adjacent pairs of spheres reducing the number of spheres created - only 1 revolution needed adding a parameter to the graph module to separately control the number of sides of the astroid With the given parameters, it renders in a couple of minutes for me Regards Chris //         Astroid Pendant //        ================= a=20;   function x(t)= a*cos(t)*cos(t)*cos(t); function y(t)= a*sin(t)*sin(t)*sin(t); module graph(r, step, sides, max=360) {    for (t=[0:step:max]) {        hull() {            translate([x(t),y(t),0])   sphere(r,$fn=sides);            translate([x(t+step),y(t+step),0])   sphere(r,$fn=sides);                    }    } }; graph(1,4,12); $fn=6; render() translate([0,22.5,0]) rotate([0,90,0]) rotate_extrude(convexity = 10) translate([2, 0, 0]) circle(.5); //x(t) = r cos(t)^3, //y(t) = r sin(t)^3, If you reply to this email, your message will be added to the discussion below: http://forum.openscad.org/Can-anyone-help-me-to-render-my-model-tp21266p21267.html To unsubscribe from Can anyone help me to render my model., click here. NAML -- View this message in context: http://forum.openscad.org/Can-anyone-help-me-to-render-my-model-tp21266p21281.html Sent from the OpenSCAD mailing list archive at Nabble.com.