Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Drawing a Convex Hull in Maple

  1. Jun 8, 2007 #1
    Urgent Question: Drawing a Convex Hull in Maple

    1. The problem statement, all variables and given/known data

    Drawing a Convex Hull of 5 2D Points....

    2. Relevant equations

    None

    3. 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 (Text):
    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:

    [​IMG]

    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.

    [​IMG]

    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 (Text):
    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: Jun 8, 2007
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you help with the solution or looking for help too?
Draft saved Draft deleted



Similar Discussions: Drawing a Convex Hull in Maple
  1. Maple procedure (Replies: 0)

  2. Plotting With Maple (Replies: 1)

Loading...