@@ -38,6 +38,9 @@ They are defined by an origin and a radius.
3838While you can technically create a HyperSphere of any dimension, decomposition
3939is only defined in 2D and 3D.
4040
41+ ``` @setup hypersphere
42+ using GeometryBasics
43+ ```
4144``` @repl hypersphere
4245s1 = HyperSphere{4, Int}(Point{4, Int}(0), 5)
4346s2 = Sphere(Point3f(0, 0, 1), 1)
@@ -51,6 +54,10 @@ The coordinates of Circle are defined in anti-clockwise order.
5154
5255A ` Cylinder ` is a 3D shape defined by two points and a radius.
5356
57+
58+ ``` @setup cylinder
59+ using GeometryBasics
60+ ```
5461``` @repl cylinder
5562c = Cylinder(Point3f(-1, 0, 0), Point3f(0, 0, 1), 0.3f0) # start point, end point, radius
5663```
@@ -63,6 +70,10 @@ Cylinder supports normals an Tessellation, but currently no texture coordinates.
6370coming together into a sharp point.
6471It is defined by by the center point of the base, its height and its width.
6572
73+
74+ ``` @setup pyramid
75+ using GeometryBasics
76+ ```
6677``` @repl pyramid
6778p = Pyramid(Point3f(0), 1f0, 0.3f0) # center, height, width
6879```
@@ -74,6 +85,9 @@ Pyramid supports normals, but currently no texture coordinates or tessellation
7485In GeometryBasics ` Tessellation ` is a wrapper type for primitives which communicates
7586how dense the mesh generated from one should be.
7687
88+ ``` @setup tessellation
89+ using GeometryBasics
90+ ```
7791``` @repl tessellation
7892t = Tessellation(Cylinder(Point3f(0), Point3f(0,0,1), 0.2), 32) # 32 vertices for each circle
7993normal_mesh(t)
@@ -178,4 +192,4 @@ function GeometryBasics.texturecoordinates(::Parallelepiped{T}) where {T}
178192 ]
179193 return FaceView (uvs, fs)
180194end
181- ```
195+ ```
0 commit comments