A mobius strip would, ofc, be represented as a triangle strip in
java3d. A single triangle strip would of course only fill on one side
(and java3d will handily let you pick which side!) so my advice would
be to make a triangle strip, clone it, and texture it appropriately,
then take the cloned triangle strip, flip the visible surface, and
texture it in the other manner. Of course, because of the half twist,
the textures will appear to suddenly flip over where the triangle strip
starts and ends.
My suggestion, therefore, would be to colour shade the individual
vertices of the triangle strip starting from red and running halfway
through the spectrum. The backface triangle strip should do the same,
running from halfway through the spectrum to the end of the spectrum (a
very reddish magenta).
Hope that helps!
sanbikinoraion
> I've recently started playing with Java3d; I teach Java in HS and am
> eventually hoping to incorporate some game design into my course.
[quoted text clipped - 30 lines]
> Thanks,
> Bruce Feist
Bruce Feist - 09 Nov 2006 01:50 GMT
> A mobius strip would, ofc, be represented as a triangle strip in
> java3d.
ofc = of course?
> A single triangle strip would of course only fill on one side
> (and java3d will handily let you pick which side!) so my advice would
> be to make a triangle strip, clone it, and texture it appropriately,
> then take the cloned triangle strip, flip the visible surface, and
> texture it in the other manner.
Hmm... I won't have trouble with one of the strips blocking the other
from view if they're in the same locations? If that's the case, this
should work out pretty straightforwardly... I just need *one* triangle
strip, corresponding to the single surface of the mobius strip, which
would go around twice, once for the "front side" and once for the "back
side". And then the texture mismatch should go away.
I'll give it a try! Thanks.
Bruce Feist
>> I'm displaying a shape called a Mobius strip
>>
>> how do I get the two sides to look different?
sanbikinoraion - 09 Nov 2006 10:04 GMT
ofc = of course, ofc :P
> Hmm... I won't have trouble with one of the strips blocking the other
> from view if they're in the same locations?
I wouldn't have thought so. You would need a very clever (and
simultaneously very stupid) renderer that would simultaneously be able
to clip polygons in the view plane according to occlusion (which iirc
is quite difficult to do correctly in realtime) but simultaneously be
clipping against other polygons that have already been backface-culled.