Squeezing model EXTRusion node description and application examples

xiaoxiao2021-03-06  52

Squeezing the node of extrusion extrusion and application examples -------------------------- 1. Squeezed node description: Extrusion Node Extrusion {Spine [0 0 0,0 1 0] # mfvec3f crosssection [1 1, 1 -1, -1 -1, -1 1, 1 1] # mfvec2f scale [1 1 ] # MFVec2f orientation [0 0 1 0] # MFRotation beginCap TRUE # SFBool endCap TRUE # SFBool ccw TRUE # SFBool solid TRUE # SFBool convex TRUE # SFBool creaseAngle 0 # SFFloat} : spine keel this field defines the fold line, comprising A series of three-dimensional points, sequentially connect adjacent points to get a fold line. Domain

The coordinates are defined on the local coordinate system of nodes.

Crosssection defines a two-dimensional fold line, including a series of two-dimensional coordinates, sequentially connects adjacent coordinates to get one

Segment linear fold line. The first number of the two-dimensional coordinates is X-shaped in the top of the node.

According to the other Z coordinate. / * We focus on the top two domains * /

Scale The city defines the scale zoom transformation parameters of the two-dimensional fold line. In the XZ plane of the node local coordinate system, the scale change

In exchange with the planned coordinate origin as the reference point, the first number of the value corresponds to the transformation of the X-axis, and the second number corresponds to the Z axis. Scale change

The change parameter must be greater than zero. Generally, the number of domain values ​​is the same as the Spine field, and the order corresponds to each keel construct.

The dimensional transformation of the two-dimensional demolition line. If the city only specifies a value, each two-dimensional fold line is used in this value.

Transform.

Orientation This domain defines three-dimensional rotation transform parameters. The number of general domain values ​​is the same as the Spine field, sequential

The rotation of the two-dimensional fold line at each keel construct. If the domain only specifies a value, each two-dimensional discount

The line is used to transform this value. Note that this rotation is not defined on the local coordinate system of the node, and in the corresponding

A special constructive point coordinate system at each keel structure.

Begincap This domain indicates whether the extension has a start end surface (corresponding to the first constructor in the keel). in case

Begincap = false, does not generate the starting end, otherwise, the start end is a two-dimensional discount in the CrossSection domain.

The multilateral shape composed of the line is in the XZ plane in the first constructor of the keel. ENDCAP This domain describes whether the extension is terminating end face (corresponding to the last constructor in the keel). If endcap =

FALSE, do not generate termination end, otherwise, the end surface is the first end of the two-dimensional fold line in the CrossSection field.

The polygon of the composition is in the XZ plane in the last constructor of the keel.

The CCW EXTLUSION node automatically generates the normal surface of the geometry, which determines the relationship between the normal direction and the two-dimensional fold line.

When COW = True, the two-dimensional fold line is towed (specified by the order defined by the perspective), and the keel is moving (constructed by the keel structure.

The order of the righteousness should be a right hand relationship with the normal direction; If the domain Solid = True, only inversely observed in the normal direction, you can see it.

Geometric geometry.

Solid For a geometry, the surface of the normal direction is considered to be "outer" surface, which is opposite to "inner"

Surface, when the SOLID domain is TRUE, only the "outer" surface is displayed, and the "inner" surface does not display color. When a geometry is

When closed, this domain is used for browser implementation optimization. If SOLID = FALSE, it means "inside", "outside" table

The face must be displayed, the browser must calculate two surfaces, then use the plastic, use some point on the face in two surfaces

The same image point on the textured image.

ConveX This domain tells the beat for geometry as a complete convex body. If it is not sure, the domain should be set to

False. The Convex domain is used to optimize the space for the betler.

CREASEANGLE This domain affects the processing of the browser between the geometry adjacent surfaces. Creageangle specifies a big

At 0 angle value (radians), if the absolute value of the angle between adjacent surface normals is less than this angle, the founder pair

The adjacent surfaces are smoothed, and the ride can not be obviously detected. This domain is usually used to generate a smooth surface. : Set-Spine Eventin MFVC3F Sets the value of the SPINE path. Set-crosssection eventin mfvec2f Sets the value of the CrossSection path. Set-scale eventin mfvec2f Sets the value of Scale. Set-Orientation Eventin MFROTION Sets the value of orientation : The EXTRUSION node provides an effective and direct way to describe the form of a variety of shapes, those that can be used

This method can be used in the shape of the cross-sectional pattern to move in a certain path.

The CrossSECTION field describes a 2D quasi-shaped cross section on a X-Z plane. Place the copy of CrossSec during each

The connection of a spine path, zoom or rotate according to the value of the SCALE, the orientation domain, and then connect adjacent

The corresponding vertices of the intersection of the attached cross section are connected to form the side of the object. If BeginCap EndCap has been explained,

Suitable planar polygonal end caps (CAPs) can be added to the end of the constructed body.

------------------------2. The VRML code is as follows:

#Vrml v2.0 UTF8

# User perspective Viewpoint {position 0 4 10 description "Look"} # Background Background {skyColor [0.0 0.2 0.7, 0.0 0.5 1.0, 1.0 1.0 1.0] skyAngle [1.309,1.571]} Group {children [DEF Body Transform # screw pattern, Squeeze styling {children shape {appEaRance def DCOLOR APPEARANCE {Material Material {DiffuseColor .2 .1.32 specular .31.38.388 AmbientIntensity.07 shininess 1}} Geometry Def Whorl Extrusion {Crosssection [0.05 0,0 0.08, -0.05 0,0.05 0] spine [] scale [] begincap true endcap true solid true}}}, # end body deform # nail cap,

Cylindrical {translation 0 5.05 0 children Shape {appearance USE DColor geometry Cylinder {radius 0.5 height 0.1}}}, Transform # nail body, a conical {translation 0 2.5 0 rotation 1 0 0 3.14 children Shape {appearance USE DColor geometry Cone {bottomRadius 0.25 Height 5 Side true}} }, Def MyScript Script {Field SFFLOAT A 0.01 EventOut Mfvec3f Spin_Changed EventOut Mfvec2f SCAL_Changed

URL "VRMLScript: function initialize () {y_add = 0; // Y direction increment CENT = Math.pi / 16; // increase angle increase angle Angle = 0.0; SC = 0; // Zoom ratio N = 64 * 5; for (i = 0; i

Increment, a spiral rise is formed. * / Spin_changed [i] = new sfvec3f (part_x, y_add, part_z); scal_changed [i] = new sfvec2f (sc, sc); angle = cent; y_add = 1/64; SC = 0.01;}}} " }] Route myscript.spin_changed to whor.set_spine route myscript.scal_changed to whorl.set_scale}

3. Explanation CrossSecion [] is a closed graphic on the XZ plane, an example is a triangle; Spine [] is a trajectory of CrossSection graphic pull trajectory, (x, y, z) three-dimensional coordinate forming an array scale [] shape in each Spine point zoom ratio.

In fact, as long as the three-dimensional geometry of the high school, the extrusion is understood that it is a snatch.

转载请注明原文地址:https://www.9cbs.com/read-40872.html

New Post(0)