points origin

16 views
Skip to first unread message

Jethomas5

unread,
Mar 7, 2015, 7:23:09 AM3/7/15
to glowscri...@googlegroups.com
points is supposed to be like curve, but when I try it I get an error message that the points object has no origin.

-------------
GlowScript 1.1 VPython

a=points(pos=[vec(0,0,0),vec(1,1,1)])
rate(1)
a.origin=a.origin+vec(-1,0,0)
-------------

--------------

Error: The points object has no origin attribute.

null
--------------

Bruce Sherwood

unread,
Mar 7, 2015, 4:42:25 PM3/7/15
to glowscri...@googlegroups.com
The first sentence in the documentation of the points object is "The points object is essentially the same as the curve object except that it displays individual points at the specified positions instead of connecting them with lines, and it does not have origin, axis, or up attributes."

--

---
You received this message because you are subscribed to the Google Groups "Glowscript Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glowscript-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jethomas5

unread,
Mar 8, 2015, 5:22:49 PM3/8/15
to glowscri...@googlegroups.com
I see! I didn't notice that. it might be useful for the points object to have those, but I'm sure we can get along without them. I was able to use curve as an adequate workaround for points. I tried making a compound object that included my points but it claimed my compound object couldn't do append and I didn't work out whether that was really true, it may have been some mistake on my part. Probably frame would have worked also.

Bruce Sherwood

unread,
Mar 8, 2015, 7:21:00 PM3/8/15
to glowscri...@googlegroups.com
There is no frame in GlowScript and probably won't be, for technical reasons. The points object is a candidate for eventually having origin, etc.

The way a compound object works is that it takes the list of objects you give it and creates a new object that has pos, axis, and size, but you can't add more to it (other than making a compound object that includes this compound object in the list).

Reply all
Reply to author
Forward
0 new messages