3D geometric elements (2)

Source: Internet
Author: User

Special 2D line Representation Method

In 2D, you can use formula 12.3 to implicitly represent a straight line:

Ax + by = d

Formula 12.3 implicit definition of 2D straight lines

Another representation method is to set the VectorN= [A, B]: write formula 12.3 As formula 12.4 by means of vector notation:

P.N= D

Formula 12.4 implicit definition of 2D straight lines using vector recording

When the two sides of the equation share a constant K,NAnd D will change, but this does not change the definition of a straight line. IfNUnit vector. In most cases, computation is convenient.

Another representation method is used to change the equation and represent a straight line as an oblique truncation. For details, see formula 12.5:

Y = mx + B

Formula 12.5 oblique Truncation

M is the slope of a straight line, equal to the ratio of rise to run: every time you move the rise unit up, the run unit is moved to the right. B is y intercept (different from B in the first implicit method ). B is called Y intercept because the straight line and Y axis intersect here. After x = 0 is substituted into the preceding equation, we can clearly see that the line and Y axis are handed over to Y = B. 12.5:

The slope of the horizontal line is 0, and the slope of the vertical line is infinite. The vertical line is implicitly expressed:

X = K

Another way to describe a straight line is to give a standard vector perpendicular to a straight line.NVertical distance from the source to the straight line D. The standard vector describes the direction of a straight line, and the distance describes the position of a straight line. 12.6:

Note that this is only a special case of formula 12.4.NIs the unit vector perpendicular to a straight line, and D gives the signed distance from the origin to the straight line. This distance is perpendicular to a straight line (parallelN. Signed Distance means that if a straight line and a standard VectorND is positive if the point is on the same side of the origin. When D increases, the straight line goes in the directionNMove.

One type of deformation is to describe the position of a straight line using a straight line point instead of the distance from the source to the straight line. Of course, any point on a straight line can be used. Standard vector perpendicular to a straight lineN12.7, as shown in:

The last definition is to use a straight line as two points.QAndR, As shown in Figure 12.8. In fact, this is also the earliest definition of a straight line: to a set of two points with equal distance to a specified point.

 

Convert Between Different Representation Methods

Note that the line representation method is only applicable to 2D.

From the two-point definition form of the ray to the parameter form:

P0 =POrg

D=PEnd-POrg

On the contrary, the conversion from the parameter form to the two-point definition form:

POrg =P0

PEnd =P0 +D

If a ray is given as a parameter, an implicit representation of the line containing the Ray can be calculated:

A =DY

B =-DX

D =POrgDY-POrgDX

Implicit conversion of straight lines to Oblique truncation:

M =-A/B, B = D/B

Note that B on the left of the equal sign is the oblique Cut Type ---- B in mx + B; B on the right of the equal sign is the coefficient of Y in the implicit AX + by = D.

From the implicit format of a line to the form of "Standard vector + distance:

From the form of "Standard vector + vertices on a straight line" to the form of "Standard vector + distance" (SetNIs a standard vector ):

N=N

Distance =N.Q

Finally, convert the vertical bisector form to the hidden format:

 

Ball and circle

A ball is a 3D object defined as a set of all vertices with a given length from a given point. The distance from a point on the sphere to the ball's center is called the ball's radius. The direct representation of the ball can describe the ball's center.CAnd radius R, 12.9:

The simplicity of the ball makes it almost ubiquitous in computational geometry and graphics. The "boundary ball" is often used in the intersection test because it is very easy to check whether it is intersecting with a ball. In addition, the shape of a ball is not changed when it is rotated, so you do not have to consider the direction of the object when using the boundary ball.

The definition of the ball can directly export its implicit representation: a set of points with a given distance to the ball center. QiuxinweiC, The implicit representation of the ball with the radius of R is:

|P-C| = R

Implicit expression of the ball in formula 12.6 vector notation

Note:PAny point on the ball surface. If you want to let the point inside the ballPIf this formula is also met, you must replace the equal sign with "≤ ". Formula 12.6 is also an implicit representation of 2D circles. The formula 12.6 is expanded in 3D, and the square of both sides is obtained to obtain the formula 12.7:

(X-cx) 2 + (Y-cy) 2 + (Z-CZ) 2 = R2

Implicit definition of formula 12.7 ball

We can calculate the diameter of the circle and the ball (the distance between the two intersections is called the diameter) and the circumference (the length of a week around the circle is the circumference ), see formula 12.8:

D = 2R

C = 2 π r = π d

Formula 12.8 circle diameter and perimeter

The formula 12.9 is the area of the circle:

A = π r2

Formula 12.9 circular area

The formula for calculating the surface area S and volume V of the ball is as follows: 12.10:

S = 4 π r2

V = 4/3 π r3

Formula 12.10 ball surface area and volume

If you have learned calculus, you will find a very interesting phenomenon: the Circle area is the circumference, and the ball volume is the ball surface area.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.