Previous Page Contents

plot::yrotate -- generate plots of surface of revolution (y-axis)

Introduction

plot::yrotate(f, x = a..b) returns the surface of revolution defined by the function f(x) around the y-axis in the interval [a,b]. The rotation angle ranges from 0 to 2*PI.

plot::yrotate(f, x = a..b, Angle = r1..r2) returns the surface of revolution defined by the function f(x) around the y-axis in the interval [a,b]. The rotation angle ranges from r1 to r2.

Call(s)

plot::yrotate(f, x = a..b <, option1, option2>...)
plot::yrotate(f, x = a..b, Angle = r1..r2 <, option1, option2>...)

Parameters

f - arithmetical expression in x
x - identifier
a, b, r1, r2 - arithmetical expressions
option1, option2, ... - plot option(s) of the form option = value

Returns

an object of the domain type plot::Surface3d.

Related Functions

plot, plot::Surface3d, plot::xrotate

Details

Example 1

Let us revolve the sinus function around the y-axis in the interval x in [0, PI]:

>> r:= plot::yrotate(sin(x), x = 1..3, Title = "")
      plot::Surface3d([x cos(angle1), x sin(angle1), sin(x)],
      
         x = 1..3, angle1 = 0..2 PI)

The result is a graphical object of the domain type plot::Surface3d. To display the surface on the screen, call plot:

>> plot(r)

Here you can give scene options, for example, to change the style of the axis:

>> plot(r, Axes = Box)

Example 2

We can restrict the rotation angle like in the following call:

>> r2:= plot::yrotate(sin(x), x = 1..3, Angle = 0..PI):
   plot(r2)

Plot objects for the surface can be given together with the call of plot::yrotate, like in:

>> r2:= plot::yrotate(sin(x), x = 1..3, Color = RGB::Blue):
   plot(r2)

Or use the slot operator :: to get or set afterwards plot options of such graphical objects. For example, the rotation angle of the revolution r2 is the y-variable of the surface kept in the attribute range2:

>> angle:= r2::range2
                             angle3 = 0..2 PI

Hence, to restrict the rotation angle to the interval [0,PI/2], we enter:

>> r2::range2:= lhs(angle) = 0..PI/2:
   plot(r2)

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000