Skip to Main Content Skip to Search
Product Documentation

Radiusradius of circles, spheres etc.

Radius sets the radius of circles, spheres, cylinders, prisms, pie charts etc.

→ Examples

Attribute

Type

Value

See Also:

Base, Center, Normal, SemiAxes, Top

Details:

Radius defines the radius of circles (plot::Circle2d and plot::Circle3d, respectively), spheres (plot::Sphere), cylinders (plot::Cylinder), circumcircles of regular bases of prisms (plot::Prism) and pie charts (plot::Piechart2d and plot::Piechart3d, respectively). Also polyhedra such as plot::Dodecahedron use this attribute to set their size.

Example 1

We generate a sphere around the origin with radius 2:

s := plot::Sphere(2, [0, 0, 0])

plot::Sphere(2, [0, 0, 0])

The first argument in plot::Sphere is the radius, the second argument is the center. Internally, these values are stored as the attributes Radius and Center, respectively. We can access the objects' attributes and change them:

s::Radius, s::Center

2, [0, 0, 0]

s2 := plot::copy(s):
s2::Center := [4, 0, 0]:
s2::Radius := 1:
plot(s, s2):

MuPAD graphics

delete s, s2:

Example 2

The attribute Radius can be animated:

plot(plot::Sphere(a, [0, 0, 0], a = 1..2)):

MuPAD graphicsimage

Example 3

For a prism, the attribute Radius determines the radius of the circumcircle of its regular bases:

plot(plot::Prism(1,Edges=5), plot::Circle3d(1)):

MuPAD graphics

  


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