BilinearPatch Class
A bilinear patch is a surface defined by its 4 corner points.
- The corner points do not have to be coplanar, but if they are, the quadrilateral should be convex to avoid a self-intersecting surface.
- To evaluate the point at (u,v), the following are equivalent:
- interpolate first with u then with v:
- A0 = interpolate between point00 and point10 at fraction u
- A1 = interpolate between point01 and point11 at fraction u
- X = interpolate between A0 and A1 at fraction v
- interpolate first with v then with u:
- B0 = interpolate between point00 and point01 at fraction v
- B1 = interpolate between point10 and point11 at fraction v
- X = interpolate between B0 and B1 at fraction u
- sum all at once:
- X = (1-u)(1-v)point00 + (1-u)(v)point01 + (u)(1-v)point10 + (u)(v)point11
- interpolate first with u then with v:
Implements
Methods
Name | Description | |
---|---|---|
constructor(point00: Point3d, point10: Point3d, point01: Point3d, point11: Point3d): BilinearPatch | Capture (not clone) corners to create a new BilinearPatch. | |
clone(): BilinearPatch | Return a cloned patch. | |
cloneTransformed(transform: Transform): undefined | BilinearPatch | Return a cloned and transformed patch. | |
extendRange(range: Range3d, transform?: Transform): void | Extend a range by the range of the (optionally transformed) patch. | |
intersectRay(ray: Ray3d): undefined | CurveAndSurfaceLocationDetail[] | Compute the points of intersection with a ray. | |
isAlmostEqual(other: BilinearPatch): boolean | Test equality of the 4 points. | |
maxUEdgeLength(): number | Returns the larger of the u-direction edge lengths at v=0 and v=1. | |
maxVEdgeLength(): number | Returns the larger of the v-direction edge lengths at u=0 and u=1. | |
tryTransformInPlace(transform: Transform): boolean | Apply the transform to each point. | |
uvFractionToPoint(u: number, v: number, result?: Point3d): Point3d | Convert fractional u and v coordinates to surface point | |
uvFractionToPointAndTangents(u: number, v: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors | Evaluate as a uv surface, returning point and two derivative vectors. | |
create(point00: Point3d, point10: Point3d, point01: Point3d, point11: Point3d): BilinearPatch Static | Clone (not capture) corners to create a new BilinearPatch. | |
createXYZ(x00: number, y00: number, z00: number, x10: number, y10: number, z10: number, x01: number, y01: number, z01: number, x11: number, y11: number, z11: number): BilinearPatch Static | Create a patch from xyz values of the 4 corners. |
Properties
Name | Type | Description | |
---|---|---|---|
point00 | Point3d | corner at parametric coordinate (0,0) | |
point01 | Point3d | corner at parametric coordinate (0,1) | |
point10 | Point3d | corner at parametric coordinate (1,0) | |
point11 | Point3d | corner at parametric coordinate (1,1) |
Defined in
- geometry3d/BilinearPatch.ts Line 51
Last Updated: 13 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.