"Geodesic sphere" A better sphere() for OpenSCAD ?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

"Geodesic sphere" A better sphere() for OpenSCAD ?

bassklampfe
I am always disappointed with the spheres in OpenSCAL. With low $fn the look
- well - not so pretty, especially for small sizes. But even with high $fn
they always have a flat spot on the top/bottom and you can easily
distinguish a rotated sphere from a not rotated.

Has anyone tried to create code for a  Geodesic polyhedron
<https://en.wikipedia.org/wiki/Geodesic_polyhedron>   ? What I see from the
wikipedia screens, I like it very much. Even the "truncated icosahedron"
already looks much better than a sphere(r=2);



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

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Geodesic sphere" A better sphere() for OpenSCAD ?

nophead
I think that has been coded but simply rotate_extruding a semicircle with $fn set to a multiple of four gives a sphere with points on the poles. See https://github.com/nophead/NopSCADlib#Sphere

image.png

I override the built in sphere with this to get hulls with the correct dimensions when the spheres are placed in the corners.

On Sat, 30 Jan 2021 at 07:43, bassklampfe <[hidden email]> wrote:
I am always disappointed with the spheres in OpenSCAL. With low $fn the look
- well - not so pretty, especially for small sizes. But even with high $fn
they always have a flat spot on the top/bottom and you can easily
distinguish a rotated sphere from a not rotated.

Has anyone tried to create code for a  Geodesic polyhedron
<https://en.wikipedia.org/wiki/Geodesic_polyhedron>   ? What I see from the
wikipedia screens, I like it very much. Even the "truncated icosahedron"
already looks much better than a sphere(r=2);



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

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Geodesic sphere" A better sphere() for OpenSCAD ?

cacb
In reply to this post by bassklampfe
On 2021-01-30 08:43, bassklampfe wrote:

> I am always disappointed with the spheres in OpenSCAL. With low $fn the
> look
> - well - not so pretty, especially for small sizes. But even with high
> $fn
> they always have a flat spot on the top/bottom and you can easily
> distinguish a rotated sphere from a not rotated.
>
> Has anyone tried to create code for a  Geodesic polyhedron
> <https://en.wikipedia.org/wiki/Geodesic_polyhedron>   ? What I see from
> the
> wikipedia screens, I like it very much. Even the "truncated
> icosahedron"
> already looks much better than a sphere(r=2);

Write some OpenSCAD code with spheres, save it to an .scad file and run
it with AngelCAD. You will then get a geodesic sphere mesh.

sphere(r=2) usually means 2mm radius and that is very small, it will not
be pretty regardless of mesh type. Try a larger radius first.

Carsten Arnholm

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Geodesic sphere" A better sphere() for OpenSCAD ?

nophead
Does a geodesic sphere have vertices on the 6 semi-axis lines? I think that is a requirement when using spheres to make accurate corners.

There is no reason why a small sphere can't be pretty if $fa is set.

image.png



On Sat, 30 Jan 2021 at 08:13, <[hidden email]> wrote:
On 2021-01-30 08:43, bassklampfe wrote:
> I am always disappointed with the spheres in OpenSCAL. With low $fn the
> look
> - well - not so pretty, especially for small sizes. But even with high
> $fn
> they always have a flat spot on the top/bottom and you can easily
> distinguish a rotated sphere from a not rotated.
>
> Has anyone tried to create code for a  Geodesic polyhedron
> <https://en.wikipedia.org/wiki/Geodesic_polyhedron>   ? What I see from
> the
> wikipedia screens, I like it very much. Even the "truncated
> icosahedron"
> already looks much better than a sphere(r=2);

Write some OpenSCAD code with spheres, save it to an .scad file and run
it with AngelCAD. You will then get a geodesic sphere mesh.

sphere(r=2) usually means 2mm radius and that is very small, it will not
be pretty regardless of mesh type. Try a larger radius first.

Carsten Arnholm

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Geodesic sphere" A better sphere() for OpenSCAD ?

cacb
On 2021-01-30 09:24, nop head wrote:
> Does a geodesic sphere have vertices on the 6 semi-axis lines?

No.

> I think
> that is a requirement when using spheres to make accurate corners.

The question was whether anyone has tried to create code for a Geodesic
polyhedron. The answer is yes.

Carsten Arholm


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Geodesic sphere" A better sphere() for OpenSCAD ?

Ronaldo
In reply to this post by nophead
 nop head <[hidden email]> wrote:
Does a geodesic sphere have vertices on the 6 semi-axis lines? I think that is a requirement when using spheres to make accurate corners.

Yes, if it's based on the octahedron. The geodesic sphere based on the icosahedron doesn't have that property. In BOSL2, you may find a module called spheroid that is able to draw geodesic spheres in both styles.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Geodesic sphere" A better sphere() for OpenSCAD ?

bassklampfe
In reply to this post by bassklampfe
Ok, for some reasons my replies via email programm did not make it into the
mailing list.
I will copy them here

------------------------
Ok, in the meantime I have found https://www.thingiverse.com/thing:1484333,
which does a pretty good job for me.
Even if written in OpenSCAD, it's pretty fast and does exactly what I want.
I've added some minor tweaks, because there was a numeric overflow on small
r's, but basically it's doing all I want.
Thanks for your replies.

------------------------
I believe this picture explains, why I like geodesic sphere.
Both rendered with r=5 and $fn=50;
<http://forum.openscad.org/file/t2988/test-geodesic_sphere.png>
-8<-cut-here-8<-cut-here-8<-cut-here-8<-cut-here-8<-cut-here-8<-cut-here-
radius=5;
$fn=50;

use <geodesic_sphere.scad>

color("darkgrey")translate([5,-10,0])rotate([90,0,0])linear_extrude(1)text("OpenSCAD",size=5,halign="left");
color("darkgrey")translate([-5,-10,0])rotate([90,0,0])linear_extrude(1)text("geodesic",size=5,halign="right");
scale(10/radius)
{
    color("LightGreen") translate([-radius, 0, radius])
geodesic_sphere(radius);
    color("LightBlue")     translate([radius, 0,radius]) sphere(radius);
    color("red")         translate([+radius, 2*radius,radius])
difference(){geodesic_sphere(radius);sphere(radius);}
    color("yellow")        translate([-radius, 2*radius,radius])
difference(){sphere(radius);geodesic_sphere(radius);}
}
-8<-cut-here-8<-cut-here-8<-cut-here-8<-cut-here-8<-cut-here-8<-cut-here-


------
Even in PrusaSlicer you can see the difference (see attached Picture)
<http://forum.openscad.org/file/t2988/spheres-in-slicer.png>
Ok folks, thank you for listening, for me this topic can be closed...






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

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Geodesic sphere" A better sphere() for OpenSCAD ?

RevarBat
In reply to this post by Ronaldo
In BOSL2, the command `spheroid(d=100, type=“octa”);` will make a sphere based on a subdivided octahedron, which guarantees maxima/minima on all three axes. With type=“icosa”, it subdivides an icosahedron, but maxima/minima on axes is only guaranteed for $fn that are modulo to both 4 and 5. 

-Revar


On Jan 30, 2021, at 1:30 AM, Ronaldo Persiano <[hidden email]> wrote:


 nop head <[hidden email]> wrote:
Does a geodesic sphere have vertices on the 6 semi-axis lines? I think that is a requirement when using spheres to make accurate corners.

Yes, if it's based on the octahedron. The geodesic sphere based on the icosahedron doesn't have that property. In BOSL2, you may find a module called spheroid that is able to draw geodesic spheres in both styles.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: "Geodesic sphere" A better sphere() for OpenSCAD ?

MichaelAtOz
Administrator
In reply to this post by bassklampfe
> Ok, for some reasons my replies via email programm did not make it into the
> mailing list.
> I will copy them here

Because you didn't use the address you subscribed with.
ie use the ...-openscad@ address and they make it, other addresses get discarded.



--
This email has been checked for viruses by AVG.
https://www.avg.com


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain;
to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.
Reply | Threaded
Open this post in threaded view
|

Re: "Geodesic sphere" A better sphere() for OpenSCAD ?

bassklampfe
Am 31.01.21 um 03:22 schrieb MichaelAtOz:
> Because you didn't use the address you subscribed with. ie use the
> ...-openscad@ address and they make it, other addresses get discarded.
Yes, thanks. I figured this out by myself now. Thank you anyway. Regards.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org