Question: How can I get Maple17 to plot this using constrained scaling?

I am creating a plot in Maple17 which will include many line segments and polygons.  I want the axes to be equally scaled, so that line segments that are perpendicular actually look perpendicular.  When I view what I have created so far, line segments that are perpendicular do not appear to be so in a plot, even though I used the "scaling=constrained" option several times.  I created a stripped-down file that isolates the problem.  Here it is:

restart:

with(plots):

segp := proc(pt1, pt2)
  description "plot of line segment between two points";
  local m;
 m:=Matrix([pt1,pt2]):
  polygonplot(m,thickness=1,scaling=constrained);
end proc:

slope := proc(pt1, pt2)
  description "slope of line segment btwn two different points";
  (pt2[2]-pt1[2])/(pt2[1]-pt1[1])
end proc:

 

 

pa9:=[0.1864032968, 0.9824733131];

[.1864032968, .9824733131]

(1)

pa16:=[0.6816387600, 0.7316888689];

[.6816387600, .7316888689]

(2)

pd9:=[0.05940746930, 0.7316888689];

[0.5940746930e-1, .7316888689]

(3)

slope(pa9,pa16)*slope(pa9,pd9);

-1.000000000

(4)

display({segp(pa9,pa16),segp(pa9,pd9)},scaling=constrained);

 

 

 

 


Download perp.mw

 



An angle that should be a right angle looks obtuse in the plot.  I used "scaling=constrained" in both the "display" command and the "segp" procedure.  I am using "polygonplot" to plot line segments (degenerate polygons) because the final plot will contain genuine polygons and this seemed like the easiest way to do it.  If this is a bad idea for some reason I can change it.

 

GS

Please Wait...