File: ParametricGeometry.md | Updated: 11/15/2025
This class can be used to generate a geometry based on a parametric surface.
Reference: Mesh Generation with Python
const geometry = new THREE.ParametricGeometry( klein, 25, 25 );
const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
const klein = new THREE.Mesh( geometry, material );
scene.add( klein );
ParametricGeometry is an addon, and must be imported explicitly, see Installation#Addons.
import { ParametricGeometry } from 'three/addons/geometries/ParametricGeometry.js';
Constructs a new parametric geometry.
func | The parametric function. Default is a function that generates a curved plane surface.
---|---
slices | The number of slices to use for the parametric function. Default is 8.
stacks | The stacks of slices to use for the parametric function. Default is 8.
Holds the constructor parameters that have been used to generate the geometry. Any modification after instantiation does not change the geometry.
Parametric function definition of ParametricGeometry.
u | The u coordinate on the surface in the range [0,1].
---|---
v | The v coordinate on the surface in the range [0,1].
target | The target vector that is used to store the method's result.