Re: Mathematica query
- To: mathgroup at smc.vnet.net
- Subject: [mg58568] Re: Mathematica query
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Fri, 8 Jul 2005 00:45:59 -0400 (EDT)
- Organization: Uni Leipzig
- References: <daiu13$t3l$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
you mean:
IndexedPointSet /:
Graphics[IndexedPointSet[pnts_, lst_]] :=
Graphics[
lst /.
{Point[index_Integer] :>
Point[pnts[[index]]],
(h : (Line |
Polygon))[index_] :>
h[pnts[[#]] & /@
index] }]
iset = IndexedPointSet[{{0, 0}, {1, 0}, {1, 1},
{0, 1}},
{{RGBColor[1, 0, 0], Point[1]},
{RGBColor[0, 1, 0], Line[{1, 2, 3}]},
{RGBColor[0, 0, 1], Polygon[{2, 3, 4}]}}]
Show[Graphics[iset]]
??
Regards
Jens
"Aditya Kelkar" <adityakelkar at iitb.ac.in> schrieb
im Newsbeitrag news:daiu13$t3l$1 at smc.vnet.net...
>
> Hello,
> I am currently working in Mathematica to
> develope few geometry
> demonstrations. Can two or more lines share same
> endpoints? Can any
> operations such as drag, move etc can be done on
> this shared point which
> makes corresponding changes in all those lines?
> Basically can any object
> be shared between different objects along with
> its properties? I hope my
> query is clear.
> Please reply asap.
>
> with regards,
> ADITYA KELKAR
> MTech, CSE
> IIT,Bombay
> India
>
>