Controlling the Appearance of Locators in Manipulate Statements
- To: mathgroup at smc.vnet.net
- Subject: [mg79089] Controlling the Appearance of Locators in Manipulate Statements
- From: "David Park" <djmpark at comcast.net>
- Date: Wed, 18 Jul 2007 02:58:25 -0400 (EDT)
I'm still trying to learn the elements of 6.0. Here is a Manipulate statement I wrote to illustrate the functionality of ScalingTransform. One can adjust the x and y scaling about an arbitrary center of an arbitrary quadralateral. The initial display has the identity scaling so one must move the sliders to see the scaled quadralateral. Then the vertices can be moved with the locators and this will expose the center of the scaling, which can then also be moved. Manipulate[ polygon = Polygon[{p1, p2, p3, p4}]; Graphics[ {Opacity[0.6, Brown], EdgeForm[Black], polygon, Opacity[0.5, Orange], EdgeForm[Black], polygon // GeometricTransformation[#, ScalingTransform[{sx, sy}, center]] &}, Frame -> True, PlotRange -> 3, Background -> LightGreen, ImageSize -> 300], "Scaling an arbitrary quadrilateral", {{sx, 1, "\!\(\*SubscriptBox[\"s\", \"x\"]\): -2 \[Ellipsis] 2"}, -2, 2}, {{sy, 1, "\!\(\*SubscriptBox[\"s\", \"y\"]\): -2 \[Ellipsis] 2"}, -2, 2}, {{p1, {0, 0}}, Locator, Appearance -> Graphics[{AbsolutePointSize[4], Point[{0, 0}]}]}, {{p2, {1, 0}}, Locator}, {{p3, {1, 1}}, Locator}, {{p4, {0, 1}}, Locator}, {{center, {0, 0}}, Locator}] I wanted to change the appearance of the locators to points. But once I change the appearance for one of the Locators, then that appearance applies to all Locators. How could I control the appearance of each Locator individually? Specifically, how could I change the color of the last center Locator to Red while keeping the rest of them Black? Thanks for any suggestions. -- David Park djmpark at comcast.net http://home.comcast.net/~djmpark/
- Follow-Ups:
- Re: Controlling the Appearance of Locators in Manipulate
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: Controlling the Appearance of Locators in Manipulate