+ Reply to Thread
Results 1 to 4 of 4

Thread: Lock point to area

  1. #1

    Lock point to area

    How can I lock a point to the area of a polygon (say a triangle). I can lock it to the perimeter, but what about the area.

    Or, another option--in the sample sheepdog file, the area of the circle 'lights up' when the points are inside the area of the circle. How does that work?

    Thanks.
    Brian

  2. #2
    Hi Brian,

    My solution for your first question is to construct the incenter of the triangle and use that as your point. See the attached sketch. PointInside.gsp

    Someone else may have a better idea.

    Can you attach the sample sheepdog file? I'm not familiar with that sketch.

    Thanks,

    Elizabeth

  3. #3
    Sketchpad Developer
    Join Date
    Oct 2010
    Location
    Philadelphia
    Posts
    71
    Hi Brian,
    Due to difficulties in defining how the position of a point within a region should behave as the shape of the region changes, Sketchpad doesn't have a general capability of constructing a point within an arbitrary region. (The difficulties are particularly severe for a shape that can change from convex to concave.) However, a parallelogram presents a special case in which it's easy to keep track of the position of such a point even as the parallelogram changes size and shape. So here's a construction you can use to confine a point to a parallelogram interior:
    1. Construct two segments with a common endpoint. (These segments define the parallelogram; you don't even need to construct the other two sides.)
    2. Construct a point on each segment, and through each of these points construct the parallel to the other segment.
    3. Construct the intersection of the two parallels.

    The resulting intersection can be dragged anywhere within the interior of the parallelogram. You can hide the points on segments and the parallel lines.

    Use perpendicular segments in step 1 if you want to confine the point to the interior of a rectangle.

    I hope this technique is useful to you!
    --Scott

  4. #4
    Sketchpad Developer
    Join Date
    Oct 2010
    Location
    Philadelphia
    Posts
    71
    Hi Again Brian,

    The Sheep Dog construction comes from the sample sketches: Help | Sample Sketches and Tools | Fun, Useful, and Interesting Sketches | Modeling Gallery. You can inspect the construction by using Display | Show All Hidden, by using the Information tool, or by navigating through the Properties of various objects.

    When you investigate while the circle is showing, you'll find that each sheep is used to construct a perpendicular to the ray from the center of the pen through that sheep. That perpendicular in turn intersects a circle concentric to but somewhat smaller than the pen itself. The resulting intersection points are part of the construction of the green circle that lights up. When the sheep is outside the pen, the perpendicular does not intersect the smaller circle, the intersections don't exist, and consequently the green circle also does not exist (because it depends on the intersections).

    This is an example of a construction that appears to use "magic," but turns out to be based on normal constructions that you can decipher through Sketchpad's investigative tools like Show All Hidden, the Information tool, and the Properties dialog box.

    Happy sketching!
    --Scott

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts