I am drawing 3D graphics, and many of my "points" are colors instead of pairs.  Of course, the colors are projected to pairs eventually, but I would like to define paths of colors directly with .. by doing something like<br>
<br>path p;<br>p:=(1,2,3)..(4,5,6)..(7,8,9);<br><br>I have a vardef P that transforms colors into pairs, and thus I can always just do<br><br>p:=P(1,2,3)..P(4,5,6)..P(7,8,9);<br><br>but I would like to be able to omit this P usage.  My attempt thusfar is<br>
<br>---<br>def pathnode primary a =<br>   if color a: <br>      P(a) <br>   else:<br>      a<br>   fi;<br>enddef;<br><br>primarydef a .. b =<br>   pathnode(a) .. pathnode(b) <br>enddef;<br>---<br><br>but this is not working.  I would appreciate any insight into how I might fix this so that I can use .. between pairs.<br>
<br>Thanks in advance,<br><br>Troy Henderson<br>