Version 0.55.1

marker

A surface position marker.

Details

Markers are used to track points on the surface of a solid through various operations. Markers can be placed using the mark() method of a solid . If the solid gets modified (for current limitations see the marker section) the marker can be used to follow the point and derieve its changed characteristics like surface normal etc.

Example

 solid a = sphere()
 marker m = a.mark( <[1.0, 1.0, 1.0]> )
 solid b = scaling( 1.0, 1.0, 2.0 ) >> a
 echo( m.pos( b ) )
 

Members

bool is_attached( solid s )

Returns, whether the marker is attached to a certain solid. Solids inherit markers when they are derived from other solids.

vector pos( solid s )

Returns the position of the marker on solid s, if the marker is attached to the solid. (Otherwise it returns a vector <[0,0,0]>.)

vector normal( solid s )

Returns the normal at the position of the marker on solid s, if the marker is attached to the solid. (Otherwise it returns a vector <[0,0,1]>.)

vector t1( solid s )

Returns one tangential vector at the position of the marker on solid s, if the marker is attached to the solid. (Otherwise it returns a vector <[1,0,0]>.) In combination with member t2 this can be used for setting an rotational orientation in the tangential plane.

vector t2( solid s )

Returns one tangential vector at the position of the marker on solid s that is orthogonal to t1, if the marker is attached to the solid. (Otherwise it returns a vector <[0,1,0]>.) In combination with member a1 this can be used for setting an rotational orientation in the tangential plane.

See also

🗙

Search results for