Archive: 2d -> 3d conversion


21st March 2005 23:36 UTC

2d -> 3d conversion
I'm having trouble thinking of how to convert to the 3D instead of 2D, e.g.

x1=bla
y2=bla
x1=0;

--pak-9's rotation stuff

should i use something like:
x1=x(0);
y1=y(0);
z1=z(0);
??? a little help would be greatly appreciated


22nd March 2005 00:02 UTC

well, i'd be pleased if i could help! But that would unfortunately provide that i could understand what your problem is anyway...


22nd March 2005 11:52 UTC

er... superscope nor triangle.ape nor texer2 doesn`t support 3D drawing, you HAVE to convert 3D to 2D


22nd March 2005 12:03 UTC

perhaps he tries to convert from 4D to 3D, then want's to apply some code. And after that he wants to convert to 2D first. Just an assumption, cause i have no inkling of what he actually wants.


22nd March 2005 12:16 UTC

2d to 3d? 2d stays flat no matter how much more dimensions you add because the original isn't affected by adding dimensions alone.

In other words:
Even if you do have a 3D monitor (which I HIGHLY doubt) it still would be flat.


22nd March 2005 12:45 UTC

It could be that i now got what he asked for! If you convert 3D to 2D you assign the z-coordinates as a zoom factor to your 2D image (you know, near objects are big and vice versa...). And now you want to get back 3D coordinates from the 2D image, right? Wel if so i have to tell you that this isn't possible. As soon as you convert 3D into 2D you lose all perspective information. You recognize the following drawing as a cube, but AVS only recognizes three connected quadrangles.

 _____
/____/|
| ||
|____|/ (a bit crappy, i know)

22nd March 2005 13:39 UTC

right... 2D=3D if ***8710;z=0


22nd March 2005 13:51 UTC

and 2D=3D if ***916;x=0 or if ***916;y=0 ;)


22nd March 2005 13:58 UTC

xor rather.. it would be 1D if both were zero and 0D if all dimensions are 0.


22nd March 2005 14:11 UTC

:D
well actually i used the or from the normal usage of language like in 'either... or..'! or so...


22nd March 2005 15:40 UTC

From the Programming guide:

"One last step is needed before we can implement this, once we have passed our values through the rotation matrices we need to ‘project’ the pixels onto our 2D area, this is a little like interpreting the result to fit our window. The projection is:

x=x4/(z4+2);
y=y4/(z4+2);"

This stage is projecting the 3D into 2D, you can project orthogonally with just x=x3*c;y=y3*c where c is a constant for scaling. However the two lines above are a perspective projection, i.e. things further away are smaller.

You can google and search the forums for all this stuff, please just look harder


22nd March 2005 20:06 UTC

or at least ask your questions in a better way. 80% of this thread was trying to figure out what you actually wanted...
please, matt, read this, you seem to really need it:
http://www.catb.org/~esr/faqs/smart-questions.html


22nd March 2005 21:01 UTC

Can't we imply tomylobos link somewhere in the stickies? ;)
It could be pretty useful!

i specially liked this sentence: ;)
Write in clear, grammatical, correctly-spelled language


23rd March 2005 01:16 UTC

I think what I'm trying to say is:
I can create some 2D Objects and rotate in a "3rd dimension" *I think*, so how would I make a "3d" object? please and/or if replies @ expellidilition@gmail.com please? 0hh & tomy thanks


23rd March 2005 08:20 UTC

my template + explanation.

learn, don't rip.

..and yes some use other methods for aspect ratio but i know some people use AVS with h>w so I prefer this one


23rd March 2005 08:56 UTC

Matt it's not our job to tell you which objects you shall render. Just try out something. For example you could pick a random 2D object you already made and assign 'i' to the third dimension (don't forget the whole roataion & 2D->3D code of course). Then that object will automatically extend along the z-axis. Sometimes it's nothing but 'trial and error'. ;)


23rd March 2005 11:03 UTC

Originally posted by MaTTFURY
I think what I'm trying to say is:
I can create some 2D Objects and rotate in a "3rd dimension" *I think*, so how would I make a "3d" object? please and/or if replies @ expellidilition@gmail.com please? 0hh & tomy thanks
If you make 2D object and rotate it in all 3 dimensions Z value of the object is static. To make 3D object and rotate it in all 3 dimensions just make Z value dynamic, like:

foo=pi*i*(n-1)*(2/5);

px=0.5*sin(foo);
py=0.5*cos(foo);
pz=2.0*(i-0.5);

//(...rotationfoo...)

z=1/(rz+2);//notethatzdoesn`tdoanything,itsjustusedforsakeofoptimization
x=rx*z;
y=ry*z;
now if you multiply any of the coordinates (px, py or pz) with 0 instead of current number (thus making the coordinate static) it will simply be 2D object.
But if you`re asking how to FORM a 3D object, then it`s bit more complicated, you just have to use your imagination and learn from other code (no, not rip, learn... as try to understand others code).

23rd March 2005 13:01 UTC

Originally posted by TomyLobo
or at least ask your questions in a better way. 80% of this thread was trying to figure out what you actually wanted...
please, matt, read this, you seem to really need it:
http://www.catb.org/~esr/faqs/smart-questions.html
I never realised we were part of the hacker community.

Does this mean I'm elite now?

/runs off

Mummy mummy I'm l33tx0r!!!

24th March 2005 00:23 UTC

that guide applies to any kind of forum or help channel


24th March 2005 00:58 UTC

So I'm... not... 3l33x0r?


24th March 2005 01:01 UTC

no, if so you would have known earlier. Hackers know that they are cool. sorry bad luck you're none..
after all you're just erm... a fR34k or somethin.


24th March 2005 01:42 UTC

Does that mean I have to have my tatoo removed?


24th March 2005 10:37 UTC

yepp, also you have to remove the pennant of the 'q-basic programming club (est. 1988)' and all the directories on your PC called 'HakzZ', 'WarezZZZz', 'Spy-Proggzz' etc.
Neither should you forget to remove the posters from the movie hackers and the one from matrix with neo infront of his PC from your walls...


1st April 2005 03:51 UTC

stop being script kiddies :D


1st April 2005 10:33 UTC

Stop being dumb


1st April 2005 10:44 UTC

i guess that's impossible. would be the same as if i told you: 'stop beeing WotL!'


12th April 2005 00:39 UTC

where foo = point?


12th April 2005 13:30 UTC

Being a (real) hacker has nothing to do with being 'cool'. Someone who hacks is someone who has a fondness for tinkering with computers and their insides. To hack something is basically the same as working on something, but hacking tends to have an air of untidyness associated with it.

I.e. "I hacked up a solution" = I came up with something that works but has wires hanging out and loose screws everywhere.

However, this negative connotation is not always present. Being up all night 'hacking at the source code' is an admirable thing.

Sometimes the meaning is that the method of coming up with the solution was chaotic, but that the end result is in fact very elegant and clean.

A 'hacker' is thus mostly the same as a 'programmer', with the difference that a hacker enjoys what he does. Working 9 to 5 fixing bugs in some mind numbing desktop tax form app is not hacking. People who do that are 'code monkeys'.

The media of course always refers to 'crackers' as 'hackers'. Some hackers complain endless about it, wearing the hacker badge and consistently pointing out to people that it's not the same as cracking. But most hackers just know when to use the word and when not to ;). To the uninformed masses, saying "I'm a hacker but I don't break into computers" is similar to saying "I'm a pedophile but it's only platonic!".

Of course, the real crackers are usually also hackers: you can't learn how to break (into) things unless you know what they look like from the inside. Crackers who are not hackers are script kiddies.

I'm off to do some hacking :P.


14th April 2005 16:25 UTC

Originally posted by UnConeD
I'm a pedophile but it's only platonic
Most awesome quote taken out of context... EVER

18th April 2005 04:42 UTC

UnConeD is platonicist


18th April 2005 13:44 UTC

1) That isn't a word
2) That isn't funny
3) Shut up


18th April 2005 13:48 UTC

just look at his last few posts:

Originally posted by MaTTFURY
stop being script kiddies :D
Originally posted by MaTTFURY
where foo = point?
Originally posted by MaTTFURY
UnConeD is platonicist
is there anything more to say?

18th April 2005 14:41 UTC

I'm slowly beginning to regret my apology to Matt.


19th April 2005 01:52 UTC

Should it be plutonicist?

:P


19th April 2005 03:18 UTC

Of course not. I only do Uranus.
Okay that one was really bad... :P


19th April 2005 05:59 UTC

Well I was hoping UnConeD would take it with good humour (my stupidity or joke)


21st April 2005 04:50 UTC

i love it when unconed makes things gay
it's an indication that my vulgar stupidity is rubbing off on him

and with that, this thread has gone totally off whatever semblence of a topic it had when it started. i propose a lock.


heh...rubbing off


22nd April 2005 00:21 UTC

heh... 'gay'