@@ -197,15 +197,22 @@ =head2 PLOT FUNCTIONS
197197
198198=head2 PLOT MULTIPATH FUNCTIONS
199199
200- A multipath function is defined using multiple parametric paths pieced together
201- into into a single curve, whose primary use is to create a closed region to be
202- filled using multiple boundaries. This is done by providing a list of
203- parametric functions, the name of the parameter, and a list of options.
200+ A multipath function is defined using multiple parametric paths and points
201+ pieced together into into a single curve. This is done by providing a list of
202+ parametric functions and points, the name of the parameter, and a list of
203+ options. A parametric function is specified by a reference to an array
204+ containing an x function, a y function, the minimum value for the parameter, and
205+ the maximum value for the parameter, followed by options. A point is specified
206+ by a reference to an array containing the coordinates of the point. One reason
207+ for creating a multipath is to create a closed region to be filled using
208+ multiple boundaries.
204209
205210 $plot->add_multipath(
206211 [
207- [ $function_x1, $function_y1, $min1, $max1, %path_options ],
208- [ $function_x2, $function_y2, $min2, $max2, %path_options ],
212+ [ $function_x1, $function_y1, $min1, $max1, %path_options1 ],
213+ [ $function_x2, $function_y2, $min2, $max2, %path_options2 ],
214+ [ $point_x1, $point_x2 ]
215+ [ $function_x3, $function_y3, $min3, $max3, %path_options3 ],
209216 ...
210217 ],
211218 $variable,
@@ -222,19 +229,19 @@ =head2 PLOT MULTIPATH FUNCTIONS
222229The paths have to be listed in the order they are followed, but the
223230minimum/maximum values of the parameter can match the parametrization. The
224231following example creates a sector of radius 5 between pi/4 and 3pi/4, by first
225- drawing the line from (0,0) to (5sqrt(2),5/sqrt(2)), then the arc of the circle
226- of radius 5 from pi/4 to 3pi/4, followed by the final line from (-5sqrt(2),
227- 5sqrt(2)) back to the origin .
232+ drawing the arc of the circle of radius 5 from pi/4 to 3pi/4, followed by the
233+ line from (-5 sqrt(2), 5 sqrt(2)) to the origin, and then drawing the line from
234+ the origin to (5 sqrt(2), 5 sqrt(2)) .
228235
229236 $plot->add_multipath(
230237 [
231- [ 't', 't', 0, '5/sqrt(2)' ],
232238 [ '5cos(t)', '5sin(t)', 'pi/4', '3pi/4' ],
233- [ '-t', 't', '5/sqrt(2)' , 0 ],
239+ [ 0 , 0 ],
234240 ],
235241 't',
236242 color => 'green',
237243 fill => 'self',
244+ cycle => 1
238245 );
239246
240247Note that the ending point of one path does not need to be the same as the
0 commit comments