| Contents | Index |
Radius sets the radius of circles, spheres, cylinders, prisms, pie charts etc.
|
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
:
s := 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
![]()
s2 := plot::copy(s):
s2::Center := [4, 0, 0]:
s2::Radius := 1:
plot(s, s2):

delete s, s2:
Example 2
The attribute Radius can be animated:
plot(plot::Sphere(a, [0, 0, 0], a = 1..2)):


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


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 |