# stereographic projections

6 messages
Open this post in threaded view
|
Report Content as Inappropriate

## stereographic projections

 Anyone know how to do stereographic projections?  Threonin on Thingiverse has some OpenSCAD code to map a pixel array (image) onto a sphere, but that would not produce nice curves.  Examples: http://www.thingiverse.com/thing:294899http://www.thingiverse.com/thing:295281http://www.thingiverse.com/thing:418129Is there a way to create geometry and then methodically warp each point on each triangle to conform to the sphere? Jon _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|
Report Content as Inappropriate

## Re: stereographic projections

 jon_bondy wrote Is there a way to create geometry and then methodically warp each point on each triangle to conform to the sphere? Yes, if you have access to the points of the geometry. That means you need to generate the points of the polygons and not producing them by 2D primitives and 2D operators. Function project() in Threonin's code does exactly what you want. However, to get a good approximation of the projected polygon edges you should refine the edges by inserting points in it before the projection.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: stereographic projections

 In reply to this post by jon_bondy Not really stereo but: another approach is to look at problem as solids and booleans. I.e. assume point light source and a surrounding shell of a sphere which you want to cut into just as in the example links you sent. So make the (say maze object - perhaps out of individual bloacks perhaps as one object), then extrude it and use scale param down to a very small size at the point light's location, then do a boolean difference with the sphere shell. The result is the same.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: stereographic projections

Open this post in threaded view
|
Report Content as Inappropriate

## Re: stereographic projections

 Here is an example using the (seldom used?) scale param to linear_extrude. ``` \$fn=30; module 2D_shape() {         difference() {                 offset(r=3) {                         square(size=[20,30], center=true);                 }                 square(size=[20,30], center=true);         } } module 3D_projection (dist) {         linear_extrude(height = dist, center = true, convexity = 4, scale=0.1) {                 children();         } } module shell (rad, thick) {         difference() {                 sphere(r=rad, center=true);                 sphere(r=rad-thick, center=true);                 translate([0,0,rad/2])                         cube([rad*2,rad*2,rad],center=true);         } } module result () {         difference() {                 translate([0,0,24])                         shell(20,1);                 %3D_projection (30) 2D_shape();         } } result(); // shell(20,3); ```
Open this post in threaded view
|
Report Content as Inappropriate

## Re: stereographic projections

 I'm not sure I understand it at first glance, but I love it! Thank you! Jon On 2/6/2017 9:58 PM, Neon22 wrote: > \$fn=30; > module 2D_shape() { > difference() { > offset(r=3) { > square(size=[20,30], center=true); > } > square(size=[20,30], center=true); > } > } > > module 3D_projection (dist) { > linear_extrude(height = dist, center = true, convexity = 4, scale=0.1) { > children(); > } > } > > module shell (rad, thick) { > difference() { > sphere(r=rad, center=true); > sphere(r=rad-thick, center=true); > translate([0,0,rad/2]) > cube([rad*2,rad*2,rad],center=true); > } > } > module result () { > difference() { > translate([0,0,24]) > shell(20,1); > %3D_projection (30) 2D_shape(); > > } > } > > result(); > // shell(20,3); _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org