commit 6354bc97fe20c743e868bf002dfbf4fd21b977a0
Author: Aaron Fenyes Can you create something like this using The Can you create something like this using The Since the A A There’s another The large point is a glider on the line segment defined by the two small points. This template is based on the The large point is a glider on the line where the two planes intersect. The point is a glider on the circle. This template is based on the Right now, the glider gets caught on the point where the circle starts and ends. If you can overcome this limitation, try contributing some code! The point is a glider on the curve. This template is based on the The point is a glider on the parametric surface. This template is based on the This template is based on the plane–plane intersection example in the examples folder included with the source code. This template is based on the plane–sphere intersection example in the examples folder included with the source code. This template is based on the sphere–sphere intersection example in the examples folder included with the source code. A polygon is created from a list of vertices. Each vertex is given either in coordinates or as a To make the layout of the vertices easier to see, I’ve set the view’s This example shows how you can mix coordinates and You can set the fill and opacity of a 3D polygon just like you would with a 2D polygon. I recommend only filling polygons that are guaranteed to stay planar. In this example, the polygons are always planar because they’re triangles. Make the polygon below non-planar by dragging its vertices. This will probably make the fill look really weird from certain angles.
+ Right now, there are two ways to create a Octahedron challenge
+Point3D
and Polygon3D
elements? Don’t worry about including the colors; they’re just to emphasize how the polygons fit together.create
call for Polygon3D
isn’t documented, but you can look at the polygon sampler for examples.Sphere contour challenge
+Sphere3D
, Plane3D
, and IntersectionCircle3D
elements? Don’t worry about including the colors; they’re just to clarify what happens when you move the center of the sphere.visible
attribute will come in handy.create
call for Plane3D
isn’t documented, I’ve included an example below.How to create a 3D plane
+Plane3D
is created from a base point and two vectors. The base point can be given either in coordinates or as a Point3D
. The vectors are given in coordinates.3D circle sampler
+
+Circle3D
element is created from a center, a normal vector, and a radius. The center can be given either in coordinates or as a Point3D
. The normal vector is given in coordinates.Circle3D
example in the examples folder included with the source code.3D glider sampler
+
+Line glider
+Line3D
glider example in the examples folder included with the source code.Intersection line glider
+Circle glider
+Circle3D
glider example in the examples folder included with the source code.Curve glider
+Curve3D
glider example in the examples folder included with the source code.Parametric surface glider
+ParametricSurface3D
glider example in the examples folder included with the source code.3D intersection sampler
+
+Plane–plane
+Plane–sphere
+Sphere–sphere
+3D polygon sampler
+
+Creating a polygon
+Point3D
element. The vertices that are created from coordinates are styled according to the vertices
attribute. The edges of the polygon are styled according to the borders
attribute.depthOrderPoints
attribute to true
.
+Mixing coordinates and
+Point3D
elementsPoint3D
elements in a polygon’s vertex list.Filling a polygon
+The pitalls of filling a non-planar polygon
+Sphere sampler
+
+Creating spheres
+Sphere3D
:
+
+
+ Point data can be given either in coordinates or as a Point3D
.
+
Here are some styling options for spheres and the points that define them.
+ + + + + + + + + diff --git a/templates/view-demo.html b/templates/view-demo.html new file mode 100644 index 0000000..053f7bb --- /dev/null +++ b/templates/view-demo.html @@ -0,0 +1,252 @@ + + + +
+ This demo shows how the new projection
and depthOrderPoints
options of a View3D
affect the view. Use the controls to:
+
projection
set to 'parallel'
and 'central'
, respectively).depthOrderPoints
set to true
or false
).
+ + In the default orientation control mode, dragging the mouse changes the Tait-Bryan angles of the camera. +
az: {slider: {visible: true}}
el: {slider: {visible: true}}
bank: {slider: {visible: true}}
(as of version 1.9.2)
+ Version 1.9.2 introduces a new orientation control mode: the virtual trackball. In this mode, dragging from near the center of the board rolls the view along the drag direction, while dragging from near the edge of the board rotates the view in the plane of the board. These two motions transition smoothly into each other as the drag start position changes. To enable the virtual trackball, set the trackball
attribute of the View3D
to {enabled: true}
.
+
+ This demo is based on the virtual trackball example in the examples folder included with the source code. +
+ +