3d2d problem

3d2d problem

Post by Arka » Thu, 10 Jul 2003 10:35:09



Hi All!

Help me please

the problem with 3d and 2d graphics

i have Rectangle and i need rotate it
i'll do it from the rotation matrix

TForm1::P3d __fastcall TForm1::R(TForm1::P3d thk,double angel)
{
  P3d t;
  t.x=thk.x*cos(angel)-thk.x*sin(angel)+thk.x;
  t.y=thk.y;
  t.z=thk.z*sin(angel)+thk.z*cos(angel)+thk.z;
  return t;

Quote:}

and then translate it to the 2d by

TForm1::P3d __fastcall TForm1::DD(TForm1::P3d thk,TForm1::P3d c)
{
  P3d t;
  t.x=c.x+thk.x+thk.z/1.4;
  t.y=c.y+thk.y-thk.z/1.4;
  t.z=thk.z;
  return t;
  //c.x and c.y is the center

Quote:}

where P3d is
struct P3d
{
  double x,y,z;

Quote:};

and where angel is angle

i v rotate it by the timer
when it begin's at first it stand begear then smaler but a little it rotate
and then it fly away
i don't know what to do please help me!
if need i can give full code

with best regards Arkan.

 
 
 

3d2d problem

Post by Horst Kraeme » Thu, 10 Jul 2003 15:34:06



> Hi All!

> Help me please

> the problem with 3d and 2d graphics

> i have Rectangle and i need rotate it
> i'll do it from the rotation matrix

> TForm1::P3d __fastcall TForm1::R(TForm1::P3d thk,double angel)
> {
>   P3d t;
>   t.x=thk.x*cos(angel)-thk.x*sin(angel)+thk.x;
>   t.y=thk.y;
>   t.z=thk.z*sin(angel)+thk.z*cos(angel)+thk.z;
>   return t;

> }

Sorry, this is no rotation matrix

   t.x=thk.x*cos(angel)+thk.z*sin(angel);
   t.y=thk.y;
   t.z=thk.z*cos(angel)-thk.x*sin(angel);

would be a (positive) rotation about the y-axis.

Regards
Horst

 
 
 

3d2d problem

Post by Just d' FAQ » Thu, 10 Jul 2003 15:51:24



>i v rotate it by the timer
>when it begin's at first it stand begear then smaler but a little it rotate
>and then it fly away

Privet!

If you rotate, translate, rotate, translate, ..., the result is not
the same as if you rotate, rotate, ..., translate, translate, ... .

In mathematics we say rotation and translation do not commute.

 
 
 

3d2d problem

Post by Arka » Thu, 10 Jul 2003 18:23:32


ok
can you just wrote how it will be




> >i v rotate it by the timer
> >when it begin's at first it stand begear then smaler but a little it
rotate
> >and then it fly away

> Privet!

> If you rotate, translate, rotate, translate, ..., the result is not
> the same as if you rotate, rotate, ..., translate, translate, ... .

> In mathematics we say rotation and translation do not commute.

 
 
 

3d2d problem

Post by Hans-Bernhard Broeke » Thu, 10 Jul 2003 19:04:54



> ok
> can you just wrote how it will be

No, he can't, becase "how it will be" depends on what exactly you do.

The usual approach is to express everything as matrices so you can
just multiply those together to get the combined action.

Please see the FAQ of this newsgroup for introductions.
--

Even if all the snow were burnt, ashes would remain.

 
 
 

1. Problems..Problems..Problems

I'm kind of new to 3ds MAX an i've got some problems using it.
(I've got:3ds Max R1.0, Win 95,Cyrix 166+,32 Megs of Ram,Diamond
Stealth 2000)

First of all,when I launch it it always pops up a dialog box asking me
to connect to the Internet.If I press Cacel it completely locks up.
Who can help me?

Secondly, after using it for a long time ,say 1-2 hours,it goes
bezerk.The buttons change colours,the redrawing becomes slow,
sometimes I can't render(it doesn't disply the result of thr render)
It usually happens if I play the preview too many times(in the
viewport).I have the virtual memory set to 120 Megs.

And now,some questions:what are the IPAS everyone after?
Can I safely update to R1.2 or should go to R1.1?
Where can I find the update to R1.1?(I know where R1.2 is)
How can I assign a reflection map to a boolean object?

 Thank you in advance.


P.S. Please do not answer through e-mail if you can  

2. lighting optimisation ?

3. UDO importation problem/POV-ray rendering problem?

4. grid w/ transparent background?

5. (new Problems) FINAL: 8-bit colormap problems

6. WANTED: Grphx artists and other production personel

7. TEXT PROBLEM: Unwanted grey box behind text and other problems

8. 3d toolbox/pascal/basic

9. problem with rotating objects and other problems

10. texture problem and clone problem

11. Problem with light-sources- (No problem in 3DS!)

12. Dmorfx problem - Run-Time problem - Help?