Class Sphere
Represents a spherical surface.
Inheritance
Implements
Namespace: Paramdigma.Core.Geometry
Assembly: Paramdigma.Core.dll
Syntax
public class Sphere : object, ISurface
Constructors
| Improve this Doc View SourceSphere()
Initializes a new instance of Sphere around the World origin with unit radius.
Declaration
public Sphere()
Sphere(Plane, Double)
Initializes a new instance of Sphere given it's base plane and radius.
Declaration
public Sphere(Plane plane, double radius)
Parameters
Type | Name | Description |
---|---|---|
Plane | plane | |
System.Double | radius |
Properties
| Improve this Doc View SourceDomainU
Gets the domain in the U direction.
Declaration
public Interval DomainU { get; set; }
Property Value
Type | Description |
---|---|
Interval |
DomainV
Gets the domain in the V direction.
Declaration
public Interval DomainV { get; set; }
Property Value
Type | Description |
---|---|
Interval |
Plane
Gets or sets the base plane of the sphere.
Declaration
public Plane Plane { get; set; }
Property Value
Type | Description |
---|---|
Plane |
Radius
Gets or sets the radius of the sphere.
Declaration
public double Radius { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
| Improve this Doc View SourceClosestParam(Point3d)
Returns the closest point on the sphere as a 2D point containing it's UV coordinates.
Declaration
public Point2d ClosestParam(Point3d pt)
Parameters
Type | Name | Description |
---|---|---|
Point3d | pt | Point to find closest to |
Returns
Type | Description |
---|---|
Point2d | UV Parameter of the closest point as a Point2d instance. |
ClosestPointTo(Point3d)
Compute the projection of a point on this surface.
Declaration
public Point3d ClosestPointTo(Point3d point)
Parameters
Type | Name | Description |
---|---|---|
Point3d | point | Point to compute distance to. |
Returns
Type | Description |
---|---|
Point3d | Projected 3d point on the surface. |
DistanceTo(Point3d)
Compute the distance between this surface and a point.
Declaration
public double DistanceTo(Point3d point)
Parameters
Type | Name | Description |
---|---|---|
Point3d | point | Point to compute distance to. |
Returns
Type | Description |
---|---|
System.Double | Number representing the distance. |
FrameAt(Double, Double)
Compute the tangent plane at the specified surface coordinates.
Declaration
public Plane FrameAt(double u, double v)
Parameters
Type | Name | Description |
---|---|---|
System.Double | u | U coordinate. |
System.Double | v | V coordinate. |
Returns
Type | Description |
---|---|
Plane | Tangent plane. |
NormalAt(Double, Double)
Compute the normal at the specified surface coordinates.
Declaration
public Vector3d NormalAt(double u, double v)
Parameters
Type | Name | Description |
---|---|---|
System.Double | u | U coordinate. |
System.Double | v | V coordinate. |
Returns
Type | Description |
---|---|
Vector3d | Normal vector. |
PointAt(Point2d)
Computes the point at a specified parameter, provided as a Point2d instance.
Declaration
public Point3d PointAt(Point2d uvPoint)
Parameters
Type | Name | Description |
---|---|---|
Point2d | uvPoint | Point2d parameter coordinates. |
Returns
Type | Description |
---|---|
Point3d | Point3d instance of the specified point. |
PointAt(Double, Double)
Compute a point at the specified surface coordinates.
Declaration
public Point3d PointAt(double u, double v)
Parameters
Type | Name | Description |
---|---|---|
System.Double | u | U coordinate. |
System.Double | v | V coordinate. |
Returns
Type | Description |
---|---|
Point3d |