?????:?????????????arctan(2)? - PowerPoint PPT Presentation

1 / 50
About This Presentation
Title:

?????:?????????????arctan(2)?

Description:

Title: PowerPoint Presentation Last modified by: gfh2012 Created Date: 1/1/1601 12:00:00 AM Document presentation format: Other titles – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 51
Provided by: courseSd6
Category:
Tags: arctan | cuboid

less

Transcript and Presenter's Notes

Title: ?????:?????????????arctan(2)?


1
??? ???????
2
??? ???????
  • ????
  • ???????
  • ????????
  • ????????????
  • ????????

3
6.1 ? ?
  • ???????(????????)
  • ?????????????????????,??????????????????????
    ???????????,???????????
  • ???????
  • ??(????),????
  • ???,??
  • ???????
  • ?????????????????????
  • ??????????????????????
  • ????????????????,?????????????

????
???
??
4
6.1.1 ????
???? ??????,??????? ? ???
,?????? ? ???????
,??6.3??,?????
(6.1)
5
?????????
??????????
?
?
??(6.1)???????6.4???
??(6.1)?
(6.2)
??????????
(6.3)
(6.4)
6
6.1.2 ????
  • ?????????????
  • ??????????????????????????
  • ?????
  • ?????
  • ?????
  • ???????????????????????
  • ???,?????????
  • ???????????????45??
  • ??????????????????arctan(2)?

7
???? axonometric projection
  • ????????????,??????????????????,????????
  • ???????????????,?????????????,???????????????????
    ?????

8
????
  • ???????????,?????????????????????????
  • ?????,??????????????????????????????????????????
    ,????????????????,????????????????????????????
    ???????????,???????????

9
????????
?????? ,???
?????????? ,????
????,??????
(6.5)
??
(6.6)
?(6.6)??????????,??????????
(6.7)
10
6.1.3 ???????????????
  • ????????????????,????????????,?????
  • ????????????????,??????????,?????????,???????????
    ????????
  • ????????????????????????????

11
????? ???
????oxyz????????? ????????????
?????????? ? ????
???,??? ?????? , U????????????? ???
?? ????? ?? ??N???????? ?
12
??????
? ?? ????oxyz????, , ?
????????? ? ?
,??????oxyz? ????
????UN????,?
??x, y?z???ox, oy, oz????????,?
(6.8)
?????????? ? ??????????,??
? ? ? ???????????i,j,k? ??N????,??
13
??????
(6.8)
????oxyz??????????????????(6.8)??????
??? ? ?
?(6.8)??????????
(6.9)
??
14
???oxyz????(x, y, z) ?????????
??(6.9)???(6.3)?
(6.10)
???oxyz????(x, y, z),?(6.10)?(6.4)????????????
??? ?
?????,??(6.7)?(6.9),?
(6.11)
15
6.1.4????
????????????,??????????????????????????????,??????
???????? ?????????????????????????????,
(6.12)
??
????????,???? ??????????? ?
???,???(4.16)??A?B???
??
(6.13)
16
?????????
??????
???????,??
?
?
??
?
?? ???????,???????????????????????
17
???????????
???(6.2)?(6.12),??????????????
?????,????
(6.14)
?(6.6)?(6.14)??????????????????,??????????

18
6.2 ????????????
???????????????? ??????????????
?????,????????????????????
???????????????,?????????????????????
????????6.13???????P1P2P3P4Q1Q2Q3Q4???6.15???????,
??6.14????P1P2P3P4Q1Q2Q3Q4???6.16????
19
6.2.1???????????
??Pi?Qi??????????
? ??????P1??????,????????
???TR?,?????? ? ????????6.17??
?6.17 ????????????????
20
?????????
????????????,??????????????????
????????????????????????
????? z ???,?????
21
6.2.2???????????
1) ?????????,???
3)?????,?????
???,??? ? ???????????? 2) ???
???????????,????
4) ????z???,????S2? ??? ????
????
22
6.3 ????????
???????? ?????,???????x0, x1, y0, y1,
z0?z1?????????????? ??????????,???xz, xz,
yz, yz, zzmin?z1?????????
?6.19 ?????
23
SutherlandCohen ???????
?????????????????,??????? ???????,?1??1,xlt0,(xltz)
???????,?2??1,xgt1,(xgtz) ???????,?3??1,ylt0,(ylt
z) ???????,?4??1,ygt1,(ygtz) ???????,?5??1,zgt1,(zgt1)

???????,?6??1,zlt0,(zltzmin)
???????????????
24
?????????????
????????? P1(x1, y1, z1)?P2(x2, y2, z2) ,?????
xx1(x2x1)t,
yy1(y2y1)t,
zz1(z2z1)t ????????,??y1???,
?tL????????????
?P1P2???x -z????,???????x-z?????????
25
???Barsky ???????
?????????,????????????????,?
?
,
,
????????????
26
clip???????
begin t00 t11 deltaxx1x0
delatzz1z0 clipt (deltax, deltaz, x0
z0, t0, t1) clipt (deltax, deltaz, z0x0,
t0, t1) deltayy1y0 clipt (deltay,
deltaz, y0 z0, t0, t1) clipt (deltay,
deltaz, z0y0, t0, t1) clipt (deltaz,
z0zmin, t0, t1) clipt (deltaz, 1z0, t0,
t1) x0x0 t0deltax y0y0
t0deltay z0z0 t0deltaz x1x0
t1deltax y1y0 t1deltay z1z0
t1deltaz showline (x0, y0, z0, x1, y1,
z1) 1 end
27
?????(??)???
  • ?????(??)???????????????????????????????????
    ????????????????
  • ????????????????????,???????????????????????
    ???

28
6.4 ????????
??(?)????????????????,?
?????????????(VL,VB)? (VR,VT) ? ????(WL,WB)?(WR,WT
)??????????????????????????? ?
???????(xv, yv)????????
???
(6.15)
??
29
6.4 ????????
(6.16)
???????
??
?OpenGL???????????? void glViewport
(GLint x, GLint y, GLsizei width, GLsizei
height) ??x?y?????????(?????)??width?height????
???????????,???????(0,0,winWidth,winHeight),??winW
idth?winHeight????????????????????????????,???????
????
30
???????
  • ????glViewport()?OpenGL???????????
  • ?glViewport(0, 0, width, height)??glViewport(0,
    0, width/2, height/2),?????,????????????????glView
    port()????????????(??)?
  • ????(???)?gluOrtho2D(0, width, 0, height)
    ??gluOrtho2D(0, 2width, 0, 2height),?????,??????
    ??????????????,?????(???)???,?????????

31
?????
  • ??????????????????
  • ???OpenGL?????glFrustum()?glPerspective()?glOrth
    o()?????????????,???????????????????
  • ????????,???????????????,
  • ?????????????

32
??????
??????????????(xc, yc, zc)?????r,????????,r???
????????????????
??????????,???????????
??(xc, yc, zc)???? ,?
? ?????, ?????????,?????????VL,V
B,VR,VT???????,????,????????????,
33
6.5 ???????
??????????????????T1,???
(6.17)
??T1???44??????????
(6.18)
??T2?34??,?????????
(6.19)
??T3?33??????????????????,?x?y???????????,??3
3?????T4???,?
(6.20)
???(6.17)??(6.20)??????
(6.21)
??TT4T3T2T1???34???
34
???????
(6.21)
????????,????T,??????????,???????????(6.21
)?,?????????????
(6.22)
?????????,????????????,??????,???(6.22)???
?????,??????
35
???????
??6.21??,???????,?????????????????,????????????,??
????????T???
??????,??????????
GKS3D ??????
36
???????
  • ?????,??????????????????????????,???????????
    ???,????????

?????????
TT4T3T2T1
37
6.6.1 OpenGL??????
  • ????
  • ???????????????,???????????????,???????????
    ????,???????????????????????????????,?????????????
    ,??????,????????????????????,??????????
  • if (c_mode1) glTranslatef(2,0,-2) //??
  • if (c_mode2) glScalef(0.5,0.6,1.2) //??
  • if (c_mode3) glRotatef(30,0,1,0) //??
  • ????
  • ??????,????????????????,????????,??????,???
    ????????????,????????????
  • gluLookAt(0,0,12,0,0,0,0,1,0) //????????

38
gluLookAt
  • ????????,???eye,center,upeye????????????????,
    center????????????????,up??????????,???????????
    ???,????up?????????????????????,?????????,????????
    ?????,??X,Z??0,Y?????,???????1,???????????(??)??

39
OpenGL??????
  • ????
  • ????????????,???????????????
  • glFrustum(-0.5,1,-0.5,1,1,20) //????????
  • glOrtho(-7,7,-7,7,2,12) //????????

40
  • ????
  • ????????????????????????????????????????????
    ????????
  • ????????????????????,??????????????????????????
  • glViewport(0,0,cx,cy) //??????, cy??????

41
6.6.2 OpenGL??????????
?1 ???????,????????,????,????????????????,????6.2
26.26???
42
????????
void CExam2ViewOnDraw(CDC pDC)
CExam2Doc pDoc GetDocument() ASSERT_VALID(pDo
c) // TODO add draw code for native data
here glClearColor(1,1,1,1) //????? glClear(GL_
COLOR_BUFFER_BIT) glLoadIdentity()
//??????? gluLookAt(0,0,12,0,0,0,0,1,0) //???,
(0,0,0)??????, //gluLookAt(-2,0,14,-
2,0,0,0,1,0) //????????????? draw_coord() glP
ushMatrix() //??????????? glTranslatef(1,1,1)
//????????????????(1,1,1)?? //??????????
43
if (c_mode1)glTranslatef(2,0,-2)//??
if (c_mode2)glScalef(0.5,0.6,1.2)//??
if (c_mode3)glRotatef(30,0,1,0)//??
//??????????????????? //glGetDoublev(GL_MODEL
VIEW_MATRIX,array) draw_cuboid(4,4,4)
glPopMatrix() //?????????????? void
CExam2ViewOnSize(UINT nType, int cx, int
cy)//?????????? CViewOnSize(nType, cx,
cy) //?????????????? // TODO Add your
message handler code here
glMatrixMode(GL_PROJECTION) //???????????
glLoadIdentity()
glFrustum(-0.5,1,-0.5,1,1,20) //????
glMatrixMode(GL_MODELVIEW) //???????????
glShadeModel(GL_FLAT) //
??????,GL-FLAT,?????????,
//
GL-SMOOTH,??????????
glViewport(0,0,cx,cy) // ????
44
?????
void CExam2Viewdraw_cuboid(GLdouble a, GLdouble
b, GLdouble c)//????? glColor3f(0,0,0)
glBegin(GL_LINE_LOOP)//??
glVertex3f(0,0,0) glVertex3f(a,0,0)
glVertex3f(a,b,0)
glVertex3f(0,b,0) glEnd()
glBegin(GL_LINES) //??????? glVertex3f(0,0,0)
glVertex3f(0,0,c) glVertex3f(a,0,0) glVer
tex3f(a,0,c) glVertex3f(a,b,0) glVertex3f(a,
b,c) glVertex3f(0,b,0)
glVertex3f(0,b,c) glEnd()
glBegin(GL_LINE_LOOP)//??
glVertex3f(0,0,c) glVertex3f(a,0,c)
glVertex3f(a,b,c) glVertex3f(0,b,c) glEnd()

45
?????
void CExam2Viewdraw_coord()//????? glColor3f(1
,0,0) glEnable(GL_LINE_STIPPLE)//???? glLineSt
ipple(1,0xF0F0)//?? glBegin(GL_LINES)
glVertex3f(0,0,0) glVertex3f(7,0,0)
glVertex3f(0,0,0) glVertex3f(0,7,0)
glVertex3f(0,0,0) glVertex3f(0,0,7)
glEnd() glDisable(GL_LINE_STIPPLE)
46
void CExam2ViewOnRotate() // TODO Add your
command handler code here c_mode3 Invalidate()
//??OnDraw void CExam2ViewOnTranslate()
// TODO Add your command handler code
here c_mode1 Invalidate()
void CExam2ViewOnScale() // TODO Add your
command handler code here c_mode2 Invalidate()
void CExam2ViewOnInicube() // TODO Add
your command handler code here c_mode0 Invalid
ate()
47
????????????
????????,??????????????????,??????glTransl
atef(2,0,-2)????6.23,????????????,???gluLookAt(0,
0, 12, 0, 0, 0, 0, 1, 0)??gluLookAt(-2, 0, 14,
-2, 0, 0, 0, 1, 0)??,????6.26???
???????glGetDoublev(GL_MODELVIEW_MATRIX,array)????
????????????,????gluLookAt (0, 0, 12, 0, 0, 0, 0,
1, 0) ,?glTranslatef(2, 0, -2)??????????????????,?
??????gluLookAt (-2, 0, 14, -2, 0, 0, 0, 1,
0)???????????,??
(6.20)
48
? 2
?????????,???????????????????1???????????,?
?????6.276.29???
49
?2????
????????
void CExam3ViewOnDraw(CDC pDC)
CExam3Doc pDoc GetDocument() ASSERT_VALID(pDo
c) // TODO add draw code for native data
here CRect rc GetClientRect(rc)//
??????? OnSize(SIZE_RESTORED,rc.right,rc.bottom)
//?rc??OnSize glClearColor(1,1,1,1) glClear(GL_
COLOR_BUFFER_BIT) glLoadIdentity()
//??????? gluLookAt(6,5.5,7,0,0,0,0,0,1) glColo
r3f(1,0,0) draw_coord() draw_cuboid(3,3,3)
50
void CExam3ViewOnSize(UINT nType, int cx, int
cy) CViewOnSize(nType, cx, cy) // TODO
Add your message handler code here glMatrixMode(G
L_PROJECTION)//??????????? glLoadIdentity() if
(p_mode0)glFrustum(-3,5,-3,5,5,20)//??,??? // g
lFrustum(-3,5,-3,5,6,20)//???????? if(p_mode1)
glOrtho(-7,7,-7,7,2,12)//?? glMatrixMode(GL_MOD
ELVIEW)//???????????? glShadeModel(GL_FLAT) gl
Viewport(0,0,cx,cy)
void CExam3ViewOnFrustum() p_mode0 Invalid
ate() void CExam3ViewOnOrtho()
p_mode1 Invalidate()
Write a Comment
User Comments (0)
About PowerShow.com