| Contents | Index |
The vector Center determines the center of various objects such a circles, spheres, pie charts etc. In rotation objects, it refers to the center of rotation.
|
Attribute |
Type |
Value |
See Also:
Details:
The vector Center determines the center of objects such as circles, spheres etc. Depending on the dimension of the object, it is given by a list or vector of 2 or 3 components.
CenterX etc. refer to the
,
,
components of this vector.
Center, CenterX etc. also denotes the rotation center in rotation objects of type plot::Rotate2d or plot::Rotate3d.
The values of these attributes can be animated.
Example 1
We create circles around the origin:
c1 := plot::Circle2d(1, [0, 0]):
c2 := plot::Circle2d(2, [0, 0]):
The second argument in plot::Circle2d is the center. Internally, it is stored as the attribute Center and can be changed by assigning a new value:
c1::Center := [1, 0]:
c2::Center := [-1, 1]:
plot(c1, c2):

delete c1, c2:
Example 2
We create an ellipse with an animated center. A copy of it is rotated around this center:
e1 := plot::Ellipse2d(1, 3, Center = [a, a], a = 0..5):
e2 := plot::Rotate2d(e1, Angle = a*PI/2,
Center = e1::Center, a = 0..5):
plot(e1, e2)


delete e1, e2:
Example 3
We create a sphere of radius
and change the default center [0, 0, 0] to [1, 2, 3]:
s := plot::Sphere(2):
s::Center := [1, 2, 3]:
plot(s)

delete s:

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |