Actually seeing 4D

If you don't know where to post something, put it here and an administrator or moderator will move it to the right place.

Postby quickfur » Sun Oct 24, 2004 10:37 pm

Also, I notice that clipping is a bit odd, in that sometimes cells appear/disappear suddenly as you rotate the polytope. If my understanding is correct, obscured cells should gradually come into view, not appear suddenly. In the other version of the applet, the edges of hidden cells would suddenly appear, but this is OK because the cell is flat (as would be expected when something behind the polytope first comes into view rotated 90 degrees into W, and so it would appear flat). As you continue to rotate the polytope, this "flat" cell would rise to its real 3D height, and then collapse again as it rotates towards the other side. In the new version of the code, however, sometimes I see cells that pop into view suddenly, and they are already non-flat. There seems to be something subtly wrong somewhere, but I'm not sure I can see why from looking at the code.
quickfur
Pentonian
 
Posts: 2955
Joined: Thu Sep 02, 2004 11:20 pm
Location: The Great White North

Postby pat » Mon Oct 25, 2004 12:54 am

I think the little bits of concavity that show up are a result of the fact that the clipping is done based on visibility from a point. If it were done as visibility in a direction, these wouldn't show up. I think it's just the result of the perspective with which the clipping takes place.

If you imagine a 3-D cube.... rotate it so that you're looking at a vertical edge but can see only two faces. Now, rotate the cube so that the top of the edge starts coming toward you and the bottom of the edge starts moving away. Call the vertex at the top of the edge 'v'. I'm thinking that because of the clipping perspective, the top edges of the cube end up looking concave at 'v' for a tiny bit before the vertex on the top face opposite 'v' becomes visible.

Now, the only reason this would happen is if my perspective when rendering to 3-D is slightly more severe than it should be. I'm not surprised that it is. I'm not sure if I'll be able to correct it entirely. I'll look at that code again.
pat
Tetronian
 
Posts: 563
Joined: Tue Dec 02, 2003 5:30 pm
Location: Minneapolis, MN

Postby pat » Mon Oct 25, 2004 1:00 am

quickfur wrote:Also, I notice that clipping is a bit odd, in that sometimes cells appear/disappear suddenly as you rotate the polytope.


I think this is also an artifact of the same thing. I'll have to try parallel projection for the clipping of vertexes.

If you rotate the cube slightly with the first mouse button until another facet appears and then rotate with the third mouse button, you'll see that the new facet is very small compared to the original. I think that if the clipping and perspective were more in sync, then the new facet would be even smaller when it first appears because it would appear sooner in the rotation.
pat
Tetronian
 
Posts: 563
Joined: Tue Dec 02, 2003 5:30 pm
Location: Minneapolis, MN

Postby pat » Mon Oct 25, 2004 1:17 am

Okay, I moved the clipping viewpoint 10 times further away than the display viewpoint. I think that takes care of most of the issues. You can still get something that's very slightly concave... but not something that's very concave.
pat
Tetronian
 
Posts: 563
Joined: Tue Dec 02, 2003 5:30 pm
Location: Minneapolis, MN

Postby quickfur » Mon Oct 25, 2004 4:22 am

pat wrote:Okay, I moved the clipping viewpoint 10 times further away than the display viewpoint. I think that takes care of most of the issues. You can still get something that's very slightly concave... but not something that's very concave.

Ahh, that's much better. Yeah, you're right, the perspective projection does go out of sync with the clipping slightly, that's why it looks weird.

BTW, did you update the .jar file link? I didn't see any new changes in the jar file. I've merged the current .jar file on your page with my changes; the result is at http://quickfur.ath.cx:8080/~hsteoh/.test/webtest.html. It doesn't have your latest fix, though.
quickfur
Pentonian
 
Posts: 2955
Joined: Thu Sep 02, 2004 11:20 pm
Location: The Great White North

Postby quickfur » Mon Oct 25, 2004 4:39 am

quickfur wrote:BTW, did you update the .jar file link? I didn't see any new changes in the jar file. I've merged the current .jar file on your page with my changes; the result is at http://quickfur.ath.cx:8080/~hsteoh/.test/webtest.html. It doesn't have your latest fix, though.

Actually, nevermind. My mistake. I got the changes now, they're merged in to my page.

I wonder, though, why the previous version (the one I had on my page before before the viewpoint changes) looked better. Was that actually wrong mathematically?
quickfur
Pentonian
 
Posts: 2955
Joined: Thu Sep 02, 2004 11:20 pm
Location: The Great White North

Previous

Return to Where Should I Post This?

Who is online

Users browsing this forum: No registered users and 2 guests