1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
dotSCAD/docs/lib3x-stereographic_extrude.md

35 lines
1.4 KiB
Markdown
Raw Normal View History

2017-03-28 09:09:37 +08:00
# stereographic_extrude
Takes a 2D polygon as input and extends it onto a sphere. If you light up a lamp on the north pole of the sphere, the shadow will return to the original 2D polygon. For more information, take a look at [Stereographic projection](https://en.wikipedia.org/wiki/Stereographic_projection).
The 2D polygon should center at the origin and you have to determine the side length of a square which can cover the 2D polygon. Because the 2D polygon will be extended onto a sphere, you can use `$fa`, `$fs` or `$fn` to controll the sphere resolution.
## Parameters
- `shadow_side_leng` : The side length of a square which can cover the 2D polygon.
2017-04-26 21:12:37 +08:00
- `$fa`, `$fs`, `$fn` : Check [the sphere module](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#sphere) for more details.
2017-03-28 09:09:37 +08:00
## Examples
2022-06-06 13:11:46 +08:00
use <stereographic_extrude.scad>
2017-03-30 14:22:48 +08:00
2017-03-28 09:09:37 +08:00
dimension = 100;
2022-03-30 09:39:11 +08:00
stereographic_extrude(shadow_side_leng = dimension, convexity = 10)
2017-03-28 09:09:37 +08:00
text(
"M", size = dimension,
2022-04-06 17:44:11 +08:00
valign = "center",
halign = "center"
2017-03-28 09:09:37 +08:00
);
color("black")
text(
"M", size = dimension,
2022-04-06 17:44:11 +08:00
valign = "center",
halign = "center"
2017-03-28 09:09:37 +08:00
);
2021-02-24 21:09:54 +08:00
![stereographic_extrude](images/lib3x-stereographic_extrude-1.JPG)
2017-03-28 09:09:37 +08:00
For more advanced examples, take a look at [my stereographic_projection collection](https://www.thingiverse.com/JustinSDK/collections/stereographic-projection).