Previous Up Next

12.14.5  Homothety in space: homothety

See section 11.15.5 for homotheties in the plane.

The homothety command takes two or three arguments. The first argument is a point, the center of the homothety. The second argument is a real number, which is the scaling ratio. The optional third argument is the object which is transformed.

With two arguments, homothery returns a new command which performs the dilation.
Input:

h := homothety(point(0,0,0), 2)

then:

h(point(0,0,1))

returns and draws the point (0,0,2), which is the point (0,0,1) dilated by a factor of 2 away from (0,0,0).

With a third argument of a geometric object, homothety returns and draws the dilated object.
Input:

homothety(point(0,0,0), 2, point(0,0,1))

returns and draws (0,0,2), as above.

Input:

homothety(point(0,0,0), 2, sphere(point(0,0,0),1))

returns and draws the sphere of radius 2 centered at (0,0,0).


Previous Up Next