- #1
Mathman23
- 254
- 0
Urgent Question: Drawing a Convex Hull in Maple
Drawing a Convex Hull of 5 2D Points...
None
Hi there,
I am trying draw the convex hull of the 5 points x1,x2,x3,x4,x5 below.
Is this the correct way of doing this??
The points are presented in the nation [tex]x_i = (a,b)^t[/tex].
What eactly does this mean?
I know that [tex]A^t[/tex] means a transposed matrix.
Does [tex]x_i = (a,b)^t[/tex] simply mean [tex]x_i = \left[\begin{array}{c} a \\ b \end{array}\right][/tex] ??
Do I need to make the maple sheet below not draw the complete complex hull?
Here is a printout of the Convex Hull:
http://img114.imageshack.us/img114/6499/convexpl6.jpg
Do this look okay??
Secondly I have tried to draw the polygon in maple, but I am unable to complete the convex hull, and label the vertices.
http://img529.imageshack.us/img529/936/convex2la4.jpg
Here is the code that I used, maybe there is somebody who can gave me a hint on howto label the vertices, and to plot the convex hull ?
Best Regards
Fred
Homework Statement
Drawing a Convex Hull of 5 2D Points...
Homework Equations
None
The Attempt at a Solution
Hi there,
I am trying draw the convex hull of the 5 points x1,x2,x3,x4,x5 below.
Is this the correct way of doing this??
The points are presented in the nation [tex]x_i = (a,b)^t[/tex].
What eactly does this mean?
I know that [tex]A^t[/tex] means a transposed matrix.
Does [tex]x_i = (a,b)^t[/tex] simply mean [tex]x_i = \left[\begin{array}{c} a \\ b \end{array}\right][/tex] ??
Do I need to make the maple sheet below not draw the complete complex hull?
Code:
with(geometry);
[Apollonius, AreCollinear, AreConcurrent, AreConcyclic,
AreConjugate, AreHarmonic, AreOrthogonal, AreParallel,
ArePerpendicular, AreSimilar, AreTangent, CircleOfSimilitude,
CrossProduct, CrossRatio, DefinedAs, Equation, EulerCircle,
EulerLine, ExteriorAngle, ExternalBisector, FindAngle,
GergonnePoint, GlideReflection, HorizontalCoord,
HorizontalName, InteriorAngle, IsEquilateral, IsOnCircle,
IsOnLine, IsRightTriangle, MajorAxis, MakeSquare, MinorAxis,
NagelPoint, OnSegment, ParallelLine, PedalTriangle,
PerpenBisector, PerpendicularLine, Polar, Pole, RadicalAxis,
RadicalCenter, RegularPolygon, RegularStarPolygon,
SensedMagnitude, SimsonLine, SpiralRotation,
StretchReflection, StretchRotation, TangentLine,
VerticalCoord, VerticalName, altitude, apothem, area,
asymptotes, bisector, center, centroid, circle, circumcircle,
conic, convexhull, coordinates, detail, diagonal, diameter,
dilatation, directrix, distance, draw, dsegment, ellipse,
excircle, expansion, foci, focus, form, homology, homothety,
hyperbola, incircle, inradius, intersection, inversion, line,
medial, median, method, midpoint, orthocenter, parabola,
perimeter, point, powerpc, projection, radius, randpoint,
reciprocation, reflection, rotation, segment, sides,
similitude, slope, square, stretch, tangentpc, translation,
triangle, vertex, vertices]
> point(x1,[-1,-1]),point(x2,[-1,1]),point(x3,[0,-1]),point(x4,[2,0]),point(x5,[1,1]): hullname:=convexhull({ x1, x2, x3, x4, x5});
> Polygen(hullname): draw({x1,x2,x3,x4,x5},printtext=true,axes=NONE);
Here is a printout of the Convex Hull:
http://img114.imageshack.us/img114/6499/convexpl6.jpg
Do this look okay??
Secondly I have tried to draw the polygon in maple, but I am unable to complete the convex hull, and label the vertices.
http://img529.imageshack.us/img529/936/convex2la4.jpg
Here is the code that I used, maybe there is somebody who can gave me a hint on howto label the vertices, and to plot the convex hull ?
Code:
with(plottools):
> l := polygon([[-1,-1], [-1,1], [0,-1],[2,0],[1,1]], color=black, linestyle=3, thickness=2);
> plots[display](l);
Best Regards
Fred
Last edited by a moderator: