Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may.

Similar presentations


Presentation on theme: "Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may."— Presentation transcript:

1 Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. CS 497: Computer Graphics James Money

2 Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Perspective Projection To perform the perspective projection: Translate VRP to the origin. Rotate such that N becomes the Z axis, U the X axis, and V the Y axis. Translate so that COP is at the origin. Shear so that the center of the view volume becomes the Z axis. Scale so that the view volume becomes the canonical perspective view volume.

3 Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Translate VRP to origin This is simple: Translate by (-VRP).

4 Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Rotating the Axes VPN becomes the Z axis so: The U axis is perpendicular to the VUP and VPN so: The V axis is perpendicular to R z and R x so:

5 Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Rotating the Axes The Rotation matrix is: Where R 1x is the first component of R x, etc.

6 Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Translating the COP PRP is in VRC so, we must take in account VRP. However, this has been done sine we performed R*T(-VRP). So this is only:

7 Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Shearing the Z Axis To shear the Z axis to center of the view volume, we just use:

8 Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Shearing the Z Axis DOP is defined as:

9 Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Scaling the view volume Remember the origin has been modified by our shear so the Z component is now -prp n. To scale our world:

10 Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Scaling the view volume So the matrix is:

11 Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Clipping The next step would be to clip, which is what we will consider in two days. We want to clip in 4D, not 3D so we will convert our output.

12 Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Clipping We want to clip in 4D so we will not project by M per. Instead, we will use the M, which transforms us to a parallel canonical view volume, and projects:

13 Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Mapping To map the points to the screen you: Where X v.min,Y v.min,X v.max,Y v.max are the min and max of the display area on your screen. The Z values can be scaled to Z v.min =0, and Z v.max = Front - Back.

14 Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the author. Finished All that is left to do is now divide X by W and Y by W and those are your X and Y coordinates to plot the points on the screen. Also, you want to divide Z by W and that is your Z value for that point. We will need to use this Z value later on in the semester.


Download ppt "Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may."

Similar presentations


Ads by Google