Skip to Main Content Skip to Search
Product Documentation

Centercenter of objects, rotation center

CenterXcenter of objects, rotation center, x-component

CenterYcenter of objects, rotation center, y-component

CenterZcenter of objects, rotation center, z-component

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.

→ Examples

Attribute

Type

Value

See Also:

Radius, SemiAxes

Details:

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):

MuPAD graphics

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)

MuPAD graphicsimage

delete e1, e2:

Example 3

We create a sphere of radius 2 and change the default center [0, 0, 0] to [1, 2, 3]:

s := plot::Sphere(2):
s::Center := [1, 2, 3]:
plot(s)

MuPAD graphics

delete s:

  


Recommended Products

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