discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

how write this model (Gravitational potential well) with openscad?

O
oda
Tue, Oct 10, 2017 8:52 PM

how write this model (Gravitational potential well) with openscad:
https://www.thingiverse.com/thing:561757

here an pdf instruction:
https://cdn.thingiverse.com/assets/53/47/ae/bf/59/orbits_description.pdf

I'd like do it for the my son's classroom!

Thankyou in advance for your help!
Oda

--
Sent from: http://forum.openscad.org/

how write this model (Gravitational potential well) with openscad: https://www.thingiverse.com/thing:561757 here an pdf instruction: https://cdn.thingiverse.com/assets/53/47/ae/bf/59/orbits_description.pdf I'd like do it for the my son's classroom! Thankyou in advance for your help! Oda -- Sent from: http://forum.openscad.org/
P
Parkinbot
Tue, Oct 10, 2017 11:27 PM

The dirty part of the work is the groove ...

$fn=60;

difference()
{
well();
translate([0, 25, -79.7])
groove();
}
module groove(l=105, w=11)
{
translate([l, 0, 0])
rotate([-90+w, 0, 0])
cylinder(r=10, h=l);
}

module well(r=120)
{
intersection()
{
rotate_extrude() polygon(100grav());
cube([2
r, 2*r, 2000], center = true);
}

function grav(r=1.75, r0=.4, steps = 30) = concat([for
(i=[r0:(r-r0)/steps:r]) [i, -1/i]], [[r, -1/r0] ]);
}

The dirty part of the work is the groove ... > $fn=60; > > difference() > { > well(); > translate([0, 25, -79.7]) > groove(); > } > module groove(l=105, w=11) > { > translate([l, 0, 0]) > rotate([-90+w, 0, 0]) > cylinder(r=10, h=l); > } > > module well(r=120) > { > intersection() > { > rotate_extrude() polygon(100*grav()); > cube([2*r, 2*r, 2000], center = true); > } > > function grav(r=1.75, r0=.4, steps = 30) = concat([for > (i=[r0:(r-r0)/steps:r]) [i, -1/i]], [[r, -1/r0] ]); > } -- Sent from: http://forum.openscad.org/
O
oda
Wed, Oct 11, 2017 12:45 PM

Wonderfull!
Thankyou!
Oda

--
Sent from: http://forum.openscad.org/

Wonderfull! Thankyou! Oda -- Sent from: http://forum.openscad.org/