View previous topic :: View next topic |
|
Author |
Message |
MLeo
Fleet Admiral

Age: 22
Zodiac: 
Joined: 26 Nov 2002
Posts: 11439
Location: Netherlands

|
|
|

|
|
|
... I wouldn't model anymore.
But now, I'm doing Programmers Art tm.
It's actually a deformed sphere.
What you see is a sine function (which I had to implement myself, it's a coincidence that the newest code gem at devmaster.net had a fast and accurate sin/cos function).
Now, something programmer's might want to know, if you don't care how I did it,
return; //(Programmers joke)
It's done in OpenGL with the ARB_Vertex_Program extension, this isn't the latest or the newest in shaders (as Microsoft incorrectly calls them, but that's something else), but it's the latest my video card supports, it doesn't even support fragment shaders.
This is part of the shader that does the spiral form:
Code: | # Sine test
#y = 4/pi*x - 4/pi^2 x^2;
#4/pi = 1.2732395447351626861510701069801
#4/pi^2=0.40528473456935108577551785283891
# sine.x = 4/pi^2*x
# sine.y = 4/pi^2*
TEMP sine;
MUL sine.x, 1.2732395447351626861510701069801, vertex.texcoord.x;
MUL sine.y, 0.40528473456935108577551785283891, vertex.texcoord.x;
ABS sine.z, vertex.texcoord.x;
MUL sine.y, sine.y, sine.z;
ADD vertexCoords.z, sine.x, sine.y; |
I'm actually trying to make the following:
sin(3*theta)*sin(4*phi)-r=0
From here: http://nilo.stolte.free.fr/graphics.html
It's the top left image.
I doubt it will be near as much resolution, but it's close enough if you ask me.
|
_________________
How to beat the Black Screen Of Death and Script problems Also handles Console/Screen/Error report/dump.
BC Technical FAQ [Last updated 26/12/2005]
"Trust me, I'm a con artist" - Moist von Lipwig, "Going Postal, Discworld"
|
|
Back to top |
|
 |
Armondikov
Tan tan ta ra, tzing boom! Moderator


Age: 23
Zodiac: 
Joined: 09 May 2002
Posts: 12005
Location: York.

|
|
|

|
|
|
The image you're talking about is very reminiscent of atomic orbitals.
|
_________________

|
|
Back to top |
|
 |
MLeo
Fleet Admiral

Age: 22
Zodiac: 
Joined: 26 Nov 2002
Posts: 11439
Location: Netherlands

|
|
|
|
Back to top |
|
 |
Phaser
Star Trek Canon Authority Admiral


Joined: 21 Mar 2005
Posts: 3166
Location: Mourning the loss of my best friend, Curly.

|
|
|

|
|
|
Armondikov wrote: | The image you're talking about is very reminiscent of atomic orbitals. | That's exactly what came to my mind, too.
|
|
|
Back to top |
|
 |
Armondikov
Tan tan ta ra, tzing boom! Moderator


Age: 23
Zodiac: 
Joined: 09 May 2002
Posts: 12005
Location: York.

|
|
|

|
|
|
Well, they are based on equations applied to three dimensional space so its prescisely the same thing. You could look up some schrodinger solutions and put them in to see what happens.
|
_________________

|
|
Back to top |
|
 |
MLeo
Fleet Admiral

Age: 22
Zodiac: 
Joined: 26 Nov 2002
Posts: 11439
Location: Netherlands

|
|
|
|
Back to top |
|
 |
Armondikov
Tan tan ta ra, tzing boom! Moderator


Age: 23
Zodiac: 
Joined: 09 May 2002
Posts: 12005
Location: York.

|
|
|

|
|
|
If you've got some knowledge of matrix multiplication you could translate catesian into radial notation. Could give you some even more interesting results, although the amount of effort required would be huge.
|
_________________

|
|
Back to top |
|
 |
|