Geometric primitives

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Geometric primitives

David Faught
Should Croquet's geometric primitives, like TCube and TSphere, be centered on the origin prior to any transformation?

Not that it is binding on Croquet, but the VRML standards say that, prior to any transformation, all geometric primitives are centered on the (0,0,0) origin.  In particular, the TCylinder is not.  Is this a bug in Croquet, or does anybody care?
Reply | Threaded
Open this post in threaded view
|

Re: Geometric primitives

Howard Stearns
That's a reasonable default for "primitives", but certainly not for  
every primitive, nor every object. (What does the user consider  
primitive?)

For example, current layout algorithms rarely consider any  
arrangement of text to be centered about a 0,0,0 origin, nor many  
"alignment" primitives.  And consider where the business end of a  
"pencil" or "turtle" primitive should be.  As I understand it, VRML  
doesn't consider such stuff.

That said, I think of TCylinder and TSphere as quick placeholders  
that would benefit from some more thought. Not a priority that I'm  
aware of.


Howard Stearns
Croquet Lead Developer, http://croquetproject.org
DoIT Academic Technology, http://www.wisc.edu/academictech
University of Wisconsin-Madison, 1301 University Avenue, Madison, WI  
53715
  +1-608-262-3724


On Apr 27, 2006, at 8:14 AM, David Faught wrote:

> Should Croquet's geometric primitives, like TCube and TSphere, be  
> centered on the origin prior to any transformation?
>
> Not that it is binding on Croquet, but the VRML standards say that,  
> prior to any transformation, all geometric primitives are centered  
> on the (0,0,0) origin.  In particular, the TCylinder is not.  Is  
> this a bug in Croquet, or does anybody care?


Reply | Threaded
Open this post in threaded view
|

Re: Geometric primitives

David A. Smith-3
In reply to this post by David Faught
There actually was a reason I designed the TCylinder to have its base at
0,0,0 vs the other primitives which are indeed centered around the
origin. I found that having its base at the origin made it slighly
easier for certain things. Of course, it is pretty trivial to change,
though TLight uses it for its visible representations, so that needs to
be changed as well.

I also just noticed that the TTeapot is missing. This is what the
TMaterial is supposed to use if you dropped it into a scene. Someone
evidently changed it to a TCube when we moved it.

Regards,

David

David Faught wrote:

> Howard Stearns wrote:
>  
>> That's a reasonable default for "primitives", but certainly not
>> for every primitive, nor every object. (What does the user
>> consider primitive?)
>>    
>
> I'm talking specifically about geometric solid primitives.  I don't know that users should consider anything at all about primitives, but it's a pretty clear cut thing for developers.  For geometric solid primitives, the developer only specifies the shape and size.  For example, a sphere of diameter 2 units.  For a non-primitive geometric object, such as a TMesh, the individual vertices and their positions are specified more or less directly by the developer.
>
>  
>> For example, current layout algorithms rarely consider any
>> arrangement of text to be centered about a 0,0,0 origin, nor many
>> "alignment" primitives. And consider where the business end of a
>> "pencil" or "turtle" primitive should be. As I understand it,
>> VRML doesn't consider such stuff.
>>    
>
> You're right.  I am not really generalizing to include those types of things, although I do think it's reasonable for them to have a standardized default position and orientation in the world before any transformations are applied to them.
>
> And I would caution against dealing with the business end of an uncivilized turtle in any case.
>
>  
>> That said, I think of TCylinder and TSphere as quick placeholders
>> that would benefit from some more thought. Not a priority that
>> I'm aware of.
>>    
>
> That is the whole point of the geometric solid primitives as I understand it.  They are quick shorthand methods of generating some common shapes and nothing more.
>
>  
>> On Apr 27, 2006, at 8:14 AM, David Faught wrote:
>>    
>>> Should Croquet's geometric primitives, like TCube and TSphere,
>>> be centered on the origin prior to any transformation?
>>>      
>
>
>
>  


Reply | Threaded
Open this post in threaded view
|

Re: Geometric primitives

David Faught
In reply to this post by David Faught
If there is a reason why it's that way, then that answers my question.
 A transform can be applied pretty easily to get what VRML expects.

On 4/27/06, David A. Smith <[hidden email]> wrote:

> There actually was a reason I designed the TCylinder to have its base at
> 0,0,0 vs the other primitives which are indeed centered around the
> origin. I found that having its base at the origin made it slighly
> easier for certain things. Of course, it is pretty trivial to change,
> though TLight uses it for its visible representations, so that needs to
> be changed as well.
>
> I also just noticed that the TTeapot is missing. This is what the
> TMaterial is supposed to use if you dropped it into a scene. Someone
> evidently changed it to a TCube when we moved it.
>
> Regards,
>
> David