Point3D Operations
const p1 = new Point3D(1.0, 2.0, 3.0);
const p2 = new Point3D(4.0, 6.0, 8.0);
const p2 = new Point3D(4.0, 6.0, 8.0);
Point 1:
Point 2:
Distance:
Midpoint:
Vector3D Operations
const v1 = new Vector3D(3.0, 4.0, 0.0);
const v2 = new Vector3D(1.0, 0.0, 0.0);
const v2 = new Vector3D(1.0, 0.0, 0.0);
Vector 1:
Magnitude:
Normalized:
Dot Product:
Cross Product:
Sphere Operations
const center = new Point3D(0.0, 0.0, 0.0);
const sphere = new Sphere(center, 5.0);
const sphere = new Sphere(center, 5.0);
Center:
Radius:
Volume:
Surface Area:
Triangle Operations
const a = new Point3D(0.0, 0.0, 0.0);
const b = new Point3D(4.0, 0.0, 0.0);
const c = new Point3D(0.0, 3.0, 0.0);
const triangle = new Triangle(a, b, c);
const b = new Point3D(4.0, 0.0, 0.0);
const c = new Point3D(0.0, 3.0, 0.0);
const triangle = new Triangle(a, b, c);
Area:
Centroid:
Normal: