Old 3rd December 2005, 16:27   #1
JFASI
Major Dude
 
JFASI's Avatar
 
Join Date: Jan 2005
Location: I was hoping you could tell me
Posts: 1,350
Polehedra...

I'm trying to find an algorithm to model three dimensional regular to semiregular polyhedra using the Wythoff symbol . I've seen it done manually on Mathematica, but I use Maple and, well, Mathematica pales in comparison...
JFASI is offline   Reply With Quote
Old 4th December 2005, 07:25   #2
QuadHeliX
Major Dude
 
QuadHeliX's Avatar
 
Join Date: Jan 2003
Location: Washington State
Posts: 1,133
cant wait to see it!
QuadHeliX is offline   Reply With Quote
Old 4th December 2005, 16:24   #3
JFASI
Major Dude
 
JFASI's Avatar
 
Join Date: Jan 2005
Location: I was hoping you could tell me
Posts: 1,350
I'm trying to find out what Maple does to do it, but that's kind of a stretch. I't going to be tough to actually fill the the faces and all...
JFASI is offline   Reply With Quote
Old 9th December 2005, 06:01   #4
jheriko
Forum King
 
jheriko's Avatar
 
Join Date: Aug 2002
Location: a twist in the fabric of space
Posts: 2,150
Send a message via ICQ to jheriko
filling faces is easy with triangle ape. for the trivial (triangle fan) way to draw any polygon just use two adjacent vertices for two of the triangle vertices, and the centre point of the polygon for the third (average of all vertices). breaks on concave polys tho... since there is no way to reverse get them from points...

-- Jheriko

'Everything around us can be represented and understood through numbers'
jheriko is offline   Reply With Quote
Old 9th December 2005, 18:43   #5
JFASI
Major Dude
 
JFASI's Avatar
 
Join Date: Jan 2005
Location: I was hoping you could tell me
Posts: 1,350
I must admit, I never did triangle APE before...

I need a rundown, it sounds like a possibility.

Certified Spam Connoisseur.
JFASI is offline   Reply With Quote
Old 9th December 2005, 20:37   #6
UIUC85
Senior Member
 
UIUC85's Avatar
 
Join Date: Oct 2003
Posts: 272
It's more or less like superscope, but instead of having just one point, you assign 3. So in a ssc we have (x,y) to define but with the triangle ape we have (x1,y1) (x2,y2) (x3,y3). If you can do a ssc, this isn't much different.
UIUC85 is offline   Reply With Quote
Old 9th December 2005, 20:45   #7
StevenRoy
Senior Member
 
StevenRoy's Avatar
 
Join Date: Jun 2005
Location: USA
Posts: 129
Send a message via ICQ to StevenRoy Send a message via AIM to StevenRoy
It's not that different from Superscope; you mainly just set x1, y1, x2, y2, x3, and y3, instead of just the one point (x and y) with the Superscope.

Also, to change the color, set "red1", "green1", and "blue1", instead of just "red", "green" and "blue". I think it's this way because there might (fat chance) be a later version which will let you use different colours for each point, and it will shade. (This would be cool, but probably too slow to be practical.)

There is also a "zbuf" variable you can set to 1 to enable a simple form of Z-buffering. With this enabled, you can set the z1 variable to the distance to control the "Z-order" of the triangles. This is often quicker and easier than doing full depth-sorting for 3d scenes.

Am I forgetting anything?
StevenRoy is offline   Reply With Quote
Old 9th December 2005, 21:10   #8
PAK-9
Major Dude
 
PAK-9's Avatar
 
Join Date: Oct 2002
Location: The United Kingdom of Great Britain and Northern Ireland
Posts: 1,374
/Points to the guide

http://PAK-9.deviantart.com

...innit
PAK-9 is offline   Reply With Quote
Old 10th December 2005, 13:17   #9
JFASI
Major Dude
 
JFASI's Avatar
 
Join Date: Jan 2005
Location: I was hoping you could tell me
Posts: 1,350
Ok, does it draw just a triangle or fill it in?
JFASI is offline   Reply With Quote
Old 10th December 2005, 16:47   #10
Grandchild
Senior Member
 
Grandchild's Avatar
 
Join Date: Oct 2005
Location: Germany
Posts: 333
it fills it in, that's the thrill to it!
Grandchild is offline   Reply With Quote
Old 10th December 2005, 21:10   #11
JFASI
Major Dude
 
JFASI's Avatar
 
Join Date: Jan 2005
Location: I was hoping you could tell me
Posts: 1,350
Tres nice.

What about 3D? Or is Z-Buffering 3D...Bear with me...





Hahaha...trivial (triangle fan)...Get it? tri Hahahaha! That's so funny! Hahahaha!

Last edited by JFASI; 10th December 2005 at 21:32.
JFASI is offline   Reply With Quote
Old 11th December 2005, 13:15   #12
jheriko
Forum King
 
jheriko's Avatar
 
Join Date: Aug 2002
Location: a twist in the fabric of space
Posts: 2,150
Send a message via ICQ to jheriko
There is a more efficient, and less trivial way. Which is to make a triangle fan from one vertex... it reduces the number of triangles by 1, but its not as easy to see how to implement, and looks ugly when subdivided/tesselated.

You can use 'z' to implement a flat z-buffer. i.e. one z value gets drawn per triangle.

-- Jheriko

'Everything around us can be represented and understood through numbers'
jheriko is offline   Reply With Quote
Old 11th December 2005, 13:43   #13
JFASI
Major Dude
 
JFASI's Avatar
 
Join Date: Jan 2005
Location: I was hoping you could tell me
Posts: 1,350
So it'd be tricky for polyhedra...
JFASI is offline   Reply With Quote
Old 11th December 2005, 13:53   #14
jheriko
Forum King
 
jheriko's Avatar
 
Join Date: Aug 2002
Location: a twist in the fabric of space
Posts: 2,150
Send a message via ICQ to jheriko
not really. its long winded to write, but you can prove that for any convex solid, back face culling is enough to correctly occlude the faces. its basically common sense, imagine holding out a polyhedron. the only faces you can see are the ones pointing within 90 degrees the opposite of your view direction, the ones you cant see are all facing away in the remaining 180 degrees.

you can do this test with a dot product and checking its sign... its in lots of presets, look at 'starfighter redux' in wfc2 i would recommend 'jet wash', but the code is in huge avstrans-ed blocks. in fact any of the model presets i have ever made probably contain it.

you need to introduce 'occlusion' before z buffer is really necessary. e.g. convex objects that can have two triangles overlapping in 2d projection, both facing the viewer. or multiple objects, where one passes infront of the other.

-- Jheriko

'Everything around us can be represented and understood through numbers'
jheriko is offline   Reply With Quote
Old 11th December 2005, 17:21   #15
JFASI
Major Dude
 
JFASI's Avatar
 
Join Date: Jan 2005
Location: I was hoping you could tell me
Posts: 1,350
Ok, that's an idea, but still, I need to figure out how to get the Wythoff symbol or even the Schalffi symbol to yeild a polyhedron. Tough stuff...
JFASI is offline   Reply With Quote
Old 11th December 2005, 22:19   #16
StevenRoy
Senior Member
 
StevenRoy's Avatar
 
Join Date: Jun 2005
Location: USA
Posts: 129
Send a message via ICQ to StevenRoy Send a message via AIM to StevenRoy
Yeah, all this is well and good, but how do we figure out where to put the freakin' points in the first place!?
StevenRoy is offline   Reply With Quote
Old 11th December 2005, 23:07   #17
JFASI
Major Dude
 
JFASI's Avatar
 
Join Date: Jan 2005
Location: I was hoping you could tell me
Posts: 1,350
Exactly. I'm still thinking...
JFASI is offline   Reply With Quote
Old 11th December 2005, 23:36   #18
jheriko
Forum King
 
jheriko's Avatar
 
Join Date: Aug 2002
Location: a twist in the fabric of space
Posts: 2,150
Send a message via ICQ to jheriko
Forget those symbols and things... too elaborate.

Here are a couple of simple examples using a dodecahedron... I will add a couple more tomorrow, but I am tired right now.

ftp://jheriko.kicks-ass.net:69/AVS/Jheriko/examples/

The platonic solids are all pretty easy to construct, and using some more geometry you can truncate them and stellate them into lots of other stuff. Also there are some other special cases that are interesting... check out these old packs of mine, feel free to steal the vertices:

http://www.deviantart.com/deviation/720677/
http://www.deviantart.com/deviation/743266/
http://www.deviantart.com/deviation/911279/

-- Jheriko

'Everything around us can be represented and understood through numbers'
jheriko is offline   Reply With Quote
Old 12th December 2005, 20:09   #19
JFASI
Major Dude
 
JFASI's Avatar
 
Join Date: Jan 2005
Location: I was hoping you could tell me
Posts: 1,350
Cool thanks. There is a bit of fun math that turns symbols into polydehra, but I don't quite get it...
I'm a junior in high school, you see...

Certified Spam Connoisseur.
JFASI is offline   Reply With Quote
Old 13th December 2005, 00:00   #20
jheriko
Forum King
 
jheriko's Avatar
 
Join Date: Aug 2002
Location: a twist in the fabric of space
Posts: 2,150
Send a message via ICQ to jheriko
well.. the way the symbol works is by defining vertices on the inside of a sphere. but its not particularly useful unless you have a method of finding a convex hull... etc... its long winded. easier to work out a specific polyhedron that you want, and use it...

-- Jheriko

'Everything around us can be represented and understood through numbers'
jheriko is offline   Reply With Quote
Old 13th December 2005, 01:18   #21
JFASI
Major Dude
 
JFASI's Avatar
 
Join Date: Jan 2005
Location: I was hoping you could tell me
Posts: 1,350
Well, I cound use the brute ofrce method, where it just screws around for a while, but that would be no good for a visualization. Besides, for simple coding, AVS syntax is just ugly.

Certified Spam Connoisseur.
JFASI is offline   Reply With Quote
Old 13th December 2005, 23:02   #22
jheriko
Forum King
 
jheriko's Avatar
 
Join Date: Aug 2002
Location: a twist in the fabric of space
Posts: 2,150
Send a message via ICQ to jheriko
You only need to generate a polyhedron once. Brute force it and stick it in the megabuf. Why make it so hard tho? Every specific polyhedron has a simple construction method.

-- Jheriko

'Everything around us can be represented and understood through numbers'
jheriko is offline   Reply With Quote
Old 14th December 2005, 02:49   #23
jheriko
Forum King
 
jheriko's Avatar
 
Join Date: Aug 2002
Location: a twist in the fabric of space
Posts: 2,150
Send a message via ICQ to jheriko
not quite perfect, but i did the dm example. i can't be bothered to fix it right now... i can't work out why its broken... probably from looking at it for too long:

ftp://jheriko.kicks-ass.net:69/AVS/J...%20DM%203D.avs

it gets the k correctly, but the texturing is messed up, and i had to make the camera face backwards in the dm for some reason... i will work it out later...

-- Jheriko

'Everything around us can be represented and understood through numbers'
jheriko is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Visualizations > AVS

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump