Author |
Message |
Homer_simpson
![](http://compsci.ca/v3/uploads/user_avatars/18138546704b4d2a3b2e50e.gif)
|
Posted: Wed May 28, 2003 9:41 pm Post subject: 3d questions |
|
|
1. How do i caculate the distance between 2 dots in third dimention(3D)
2. what website could i use as my source for math and physic formulas... |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Catalyst
![](http://catalyze.mine.nu/jack_of_spades+100.jpg)
|
|
|
|
![](images/spacer.gif) |
Homer_simpson
![](http://compsci.ca/v3/uploads/user_avatars/18138546704b4d2a3b2e50e.gif)
|
Posted: Wed May 28, 2003 9:50 pm Post subject: (No subject) |
|
|
thx for the formula
i already know that site... but it doesn't have anything about physics it's all bout 3d shit... but it's cool and yeah some articles are really complicated =/ |
|
|
|
|
![](images/spacer.gif) |
Homer_simpson
![](http://compsci.ca/v3/uploads/user_avatars/18138546704b4d2a3b2e50e.gif)
|
Posted: Thu May 29, 2003 4:48 pm Post subject: (No subject) |
|
|
another question...
is sorting the polygons by their Z in order to be drawn the only way to do proper overlapping?! |
|
|
|
|
![](images/spacer.gif) |
Catalyst
![](http://catalyze.mine.nu/jack_of_spades+100.jpg)
|
Posted: Thu May 29, 2003 4:55 pm Post subject: (No subject) |
|
|
it is one method
there are a number of others
bsp and octrees are another method
but they are static can't be moved
z-buffering is the best solution but is FAR too
time consuming for turing
z-sorting with culling is the best solution (for Turing)
note: theres a good quick sort algorithm in turinglib (posted somewhere) |
|
|
|
|
![](images/spacer.gif) |
Homer_simpson
![](http://compsci.ca/v3/uploads/user_avatars/18138546704b4d2a3b2e50e.gif)
|
Posted: Thu May 29, 2003 4:56 pm Post subject: (No subject) |
|
|
k i'll search for that but can u explain the other methods a little more or gimme some source where i can learn about them... |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Thu May 29, 2003 4:57 pm Post subject: (No subject) |
|
|
no, I dont think it would be proper... You will defenatly run in trouble if two of your polygons are intersecting each other
though I dont think that should be the issue with turing's 3D models... they are not that complex
But since I'm no expert on 3D, I cant really say much ![Confused Confused](images/smiles/icon_confused.gif) |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
Catalyst
![](http://catalyze.mine.nu/jack_of_spades+100.jpg)
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Homer_simpson
![](http://compsci.ca/v3/uploads/user_avatars/18138546704b4d2a3b2e50e.gif)
|
Posted: Thu May 29, 2003 8:29 pm Post subject: (No subject) |
|
|
how would it crash?! if the Zs are the same i'll just make it be right after eachother... |
|
|
|
|
![](images/spacer.gif) |
Catalyst
![](http://catalyze.mine.nu/jack_of_spades+100.jpg)
|
Posted: Thu May 29, 2003 8:31 pm Post subject: (No subject) |
|
|
never said that it would crash, it just wouldnt work correctly |
|
|
|
|
![](images/spacer.gif) |
Homer_simpson
![](http://compsci.ca/v3/uploads/user_avatars/18138546704b4d2a3b2e50e.gif)
|
Posted: Thu May 29, 2003 8:34 pm Post subject: (No subject) |
|
|
Catalyst wrote:
Now that's what i'm talking about =Þ
no really.. their great sites thanx catalyst |
|
|
|
|
![](images/spacer.gif) |
Catalyst
![](http://catalyze.mine.nu/jack_of_spades+100.jpg)
|
|
|
|
![](images/spacer.gif) |
Homer_simpson
![](http://compsci.ca/v3/uploads/user_avatars/18138546704b4d2a3b2e50e.gif)
|
Posted: Thu May 29, 2003 8:44 pm Post subject: (No subject) |
|
|
wow thanx catalyst u've helping me stuff and all... here have some bits =Þ
+50 bits to catalyst |
|
|
|
|
![](images/spacer.gif) |
Homer_simpson
![](http://compsci.ca/v3/uploads/user_avatars/18138546704b4d2a3b2e50e.gif)
|
Posted: Thu May 29, 2003 9:37 pm Post subject: (No subject) |
|
|
if yer interested this is the procedure i'm gonna use to sort Z # out and it works without crashing
code: | procedure sort (var a : array 1 .. * of int)
var N : int := upper (a);
var tt := 0
var minIndex : int
for i : 1 .. (N - 1);
minIndex := i;
for j : i .. N
if (a (j) < a (minIndex)) then
minIndex := j;
end if
end for
if (minIndex > i) then
tt := a (i)
a (i) := a (minIndex)
a (minIndex) := tt
end if
end for
end sort
const number := 50
var arr : array 1 .. number of int
for i : 1 .. number
arr (i) := Rand.Int (1, number)
end for
var arr2 : array 1 .. number of int
for i : 1 .. number
arr2 (i) := arr (i)
end for
sort (arr)
for i : 1 .. number
put arr (i), " ", arr2 (i)
end for
|
|
|
|
|
|
![](images/spacer.gif) |
Catalyst
![](http://catalyze.mine.nu/jack_of_spades+100.jpg)
|
Posted: Thu May 29, 2003 9:48 pm Post subject: (No subject) |
|
|
the z-sort algorthm will never crash turing (syntax will)
however it can looked screwed up in the right situations
thats a bubble sort inst it?
way too slow for this kind of thing (unless youre using <20polys)
QuickSort is the only way to go |
|
|
|
|
![](images/spacer.gif) |
|