| 1 |
%% /usezzcamview {} def |
|---|
| 2 |
%% |
|---|
| 3 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 4 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 5 |
%% %%%% Positionnement de la caméra et du type de caméra |
|---|
| 6 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 7 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 8 |
%% /ScreenDist 0.1 def |
|---|
| 9 |
%% /ZoomFactor_x 100 def |
|---|
| 10 |
%% /ZoomFactor_y 100 def |
|---|
| 11 |
%% |
|---|
| 12 |
%% /representationtype (perspective) def |
|---|
| 13 |
%% |
|---|
| 14 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 15 |
%% %% choix du type de représentation |
|---|
| 16 |
%% /representationtype (perspective) def |
|---|
| 17 |
%% %/representationtype (ortho) def |
|---|
| 18 |
%% |
|---|
| 19 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 20 |
%% %% Set Camera Position |
|---|
| 21 |
%% /SetCamPos { %% Cam_x Cam_y Cam_z |
|---|
| 22 |
%% /Cam_z@3d exch def |
|---|
| 23 |
%% /Cam_y@3d exch def |
|---|
| 24 |
%% /Cam_x@3d exch def |
|---|
| 25 |
%% /CamPos@3d {Cam_x@3d Cam_y@3d Cam_z@3d} def |
|---|
| 26 |
%% } def |
|---|
| 27 |
%% |
|---|
| 28 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 29 |
%% %% Get Camera Position |
|---|
| 30 |
%% /GetCamPos { |
|---|
| 31 |
%% CamPos@3d |
|---|
| 32 |
%% } def |
|---|
| 33 |
%% |
|---|
| 34 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 35 |
%% %% Set Camera Looking vector |
|---|
| 36 |
%% /SetCamVec { %% Cam_Vx Cam_Vy Cam_Vz |
|---|
| 37 |
%% /Cam_Vz@3d exch def |
|---|
| 38 |
%% /Cam_Vy@3d exch def |
|---|
| 39 |
%% /Cam_Vx@3d exch def |
|---|
| 40 |
%% /CamVec@3d {Cam_Vx@3d Cam_Vy@3d Cam_Vz@3d} def |
|---|
| 41 |
%% } def |
|---|
| 42 |
%% |
|---|
| 43 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 44 |
%% %% Get Camera Looking vector |
|---|
| 45 |
%% /GetCamVec { |
|---|
| 46 |
%% CamVec@3d |
|---|
| 47 |
%% } def |
|---|
| 48 |
%% |
|---|
| 49 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 50 |
%% %% Set Camera Up vector |
|---|
| 51 |
%% /SetCamUp { %% Cam_Ux Cam_Uy Cam_Uz |
|---|
| 52 |
%% /Cam_Uz@3d exch def |
|---|
| 53 |
%% /Cam_Uy@3d exch def |
|---|
| 54 |
%% /Cam_Ux@3d exch def |
|---|
| 55 |
%% /UpVec@3d {Cam_Ux@3d Cam_Uy@3d Cam_Uz@3d} def |
|---|
| 56 |
%% } def |
|---|
| 57 |
%% |
|---|
| 58 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 59 |
%% %% Get Camera Up vector |
|---|
| 60 |
%% /GetCamUp { |
|---|
| 61 |
%% UpVec@3d |
|---|
| 62 |
%% } def |
|---|
| 63 |
%% |
|---|
| 64 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 65 |
%% %% Compute vectors usefull to CamView |
|---|
| 66 |
%% /ComputeCamera { |
|---|
| 67 |
%% |
|---|
| 68 |
%% %% Calcule le vecteur directeur ZVecteur relatif à la caméra |
|---|
| 69 |
%% CamVec@3d dupp3d norme3d -1 exch div mulv3d |
|---|
| 70 |
%% /ZVec_z@3d exch def |
|---|
| 71 |
%% /ZVec_y@3d exch def |
|---|
| 72 |
%% /ZVec_x@3d exch def |
|---|
| 73 |
%% /ZVec@3d {ZVec_x@3d ZVec_y@3d ZVec_z@3d} def |
|---|
| 74 |
%% |
|---|
| 75 |
%% %% Calcule le vecteur directeur YVecteur relatif à la caméra |
|---|
| 76 |
%% ZVec@3d dupp3d UpVec@3d scalprod3d neg mulv3d UpVec@3d addv3d dupp3d norme3d 1 exch div mulv3d |
|---|
| 77 |
%% /YVec_z@3d exch def |
|---|
| 78 |
%% /YVec_y@3d exch def |
|---|
| 79 |
%% /YVec_x@3d exch def |
|---|
| 80 |
%% /YVec@3d {YVec_x@3d YVec_y@3d YVec_z@3d} def |
|---|
| 81 |
%% |
|---|
| 82 |
%% %% Calcule le vecteur directeur YVecteur relatif à la caméra |
|---|
| 83 |
%% YVec@3d ZVec@3d vectprod3d |
|---|
| 84 |
%% /XVec_z@3d exch def |
|---|
| 85 |
%% /XVec_y@3d exch def |
|---|
| 86 |
%% /XVec_x@3d exch def |
|---|
| 87 |
%% /XVec@3d {XVec_x@3d XVec_y@3d XVec_z@3d} def |
|---|
| 88 |
%% } def |
|---|
| 89 |
%% |
|---|
| 90 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 91 |
%% %% On projete le point 3d sur le plan de représentation de la caméra, |
|---|
| 92 |
%% %% selon le mode de représentation |
|---|
| 93 |
%% /CamView { %% x y z |
|---|
| 94 |
%% 1 dict begin |
|---|
| 95 |
%% /M defpoint3d |
|---|
| 96 |
%% representationtype (ortho) eq |
|---|
| 97 |
%% {CamPos@3d M vecteur3d dupp3d |
|---|
| 98 |
%% ZVec@3d scalprod3d neg ZVec@3d lambdav3d |
|---|
| 99 |
%% addv3d dupp3d XVec@3d scalprod3d 0.01 ZoomFactor_x mul mul |
|---|
| 100 |
%% 4 1 roll YVec@3d scalprod3d 0.01 ZoomFactor_y mul mul |
|---|
| 101 |
%% } |
|---|
| 102 |
%% {CamPos@3d M vecteur3d dupp3d |
|---|
| 103 |
%% ZVec@3d scalprod3d neg ScreenDist exch div mulv3d |
|---|
| 104 |
%% dupp3d XVec@3d scalprod3d ZoomFactor_x mul |
|---|
| 105 |
%% 4 1 roll YVec@3d scalprod3d ZoomFactor_y mul |
|---|
| 106 |
%% } ifelse |
|---|
| 107 |
%% end |
|---|
| 108 |
%% } def |
|---|
| 109 |
%% |
|---|
| 110 |
%% |
|---|
| 111 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 112 |
%% %% transforme un tableau de points 3d en tableau de points 2d |
|---|
| 113 |
%% /tab3dto2d { |
|---|
| 114 |
%% 2 dict begin |
|---|
| 115 |
%% /T exch def |
|---|
| 116 |
%% /n T length def |
|---|
| 117 |
%% [ T aload pop |
|---|
| 118 |
%% n 1 sub -1 n 3 idiv 2 mul |
|---|
| 119 |
%% { 1 dict begin |
|---|
| 120 |
%% /i exch def |
|---|
| 121 |
%% CamView i 2 roll |
|---|
| 122 |
%% end } for ] |
|---|
| 123 |
%% end |
|---|
| 124 |
%% } def |
|---|
| 125 |
%% |
|---|
| 126 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 127 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 128 |
%% %%%% Version 3d des commandes jps TEXTE |
|---|
| 129 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 130 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 131 |
%% |
|---|
| 132 |
%% |
|---|
| 133 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 134 |
%% /bbtext3d { |
|---|
| 135 |
%% 2 dict begin |
|---|
| 136 |
%% /vect_echelle [1 1] def |
|---|
| 137 |
%% /angle_de_rot {0} def |
|---|
| 138 |
%% dup xcheck |
|---|
| 139 |
%% {/angle_de_rot exch def} |
|---|
| 140 |
%% if |
|---|
| 141 |
%% dup isarray |
|---|
| 142 |
%% {/vect_echelle exch def} |
|---|
| 143 |
%% if |
|---|
| 144 |
%% CamView vect_echelle {angle_de_rot} bbtext |
|---|
| 145 |
%% end |
|---|
| 146 |
%% } def |
|---|
| 147 |
%% |
|---|
| 148 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 149 |
%% /bbtexlabel3d { |
|---|
| 150 |
%% 2 dict begin |
|---|
| 151 |
%% /vect_echelle [1 1] def |
|---|
| 152 |
%% /angle_de_rot {0} def |
|---|
| 153 |
%% dup xcheck |
|---|
| 154 |
%% {/angle_de_rot exch def} |
|---|
| 155 |
%% if |
|---|
| 156 |
%% dup isarray |
|---|
| 157 |
%% {/vect_echelle exch def} |
|---|
| 158 |
%% if |
|---|
| 159 |
%% CamView vect_echelle {angle_de_rot} bbtexlabel |
|---|
| 160 |
%% end |
|---|
| 161 |
%% } def |
|---|
| 162 |
%% |
|---|
| 163 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 164 |
%% /bctext3d { |
|---|
| 165 |
%% 2 dict begin |
|---|
| 166 |
%% /vect_echelle [1 1] def |
|---|
| 167 |
%% /angle_de_rot {0} def |
|---|
| 168 |
%% dup xcheck |
|---|
| 169 |
%% {/angle_de_rot exch def} |
|---|
| 170 |
%% if |
|---|
| 171 |
%% dup isarray |
|---|
| 172 |
%% {/vect_echelle exch def} |
|---|
| 173 |
%% if |
|---|
| 174 |
%% CamView vect_echelle {angle_de_rot} bctext |
|---|
| 175 |
%% end |
|---|
| 176 |
%% } def |
|---|
| 177 |
%% |
|---|
| 178 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 179 |
%% /bctexlabel3d { |
|---|
| 180 |
%% 2 dict begin |
|---|
| 181 |
%% /vect_echelle [1 1] def |
|---|
| 182 |
%% /angle_de_rot {0} def |
|---|
| 183 |
%% dup xcheck |
|---|
| 184 |
%% {/angle_de_rot exch def} |
|---|
| 185 |
%% if |
|---|
| 186 |
%% dup isarray |
|---|
| 187 |
%% {/vect_echelle exch def} |
|---|
| 188 |
%% if |
|---|
| 189 |
%% CamView vect_echelle {angle_de_rot} bctexlabel |
|---|
| 190 |
%% end |
|---|
| 191 |
%% } def |
|---|
| 192 |
%% |
|---|
| 193 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 194 |
%% /bltext3d { |
|---|
| 195 |
%% 2 dict begin |
|---|
| 196 |
%% /vect_echelle [1 1] def |
|---|
| 197 |
%% /angle_de_rot {0} def |
|---|
| 198 |
%% dup xcheck |
|---|
| 199 |
%% {/angle_de_rot exch def} |
|---|
| 200 |
%% if |
|---|
| 201 |
%% dup isarray |
|---|
| 202 |
%% {/vect_echelle exch def} |
|---|
| 203 |
%% if |
|---|
| 204 |
%% CamView vect_echelle {angle_de_rot} bltext |
|---|
| 205 |
%% end |
|---|
| 206 |
%% } def |
|---|
| 207 |
%% |
|---|
| 208 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 209 |
%% /bltexlabel3d { |
|---|
| 210 |
%% 2 dict begin |
|---|
| 211 |
%% /vect_echelle [1 1] def |
|---|
| 212 |
%% /angle_de_rot {0} def |
|---|
| 213 |
%% dup xcheck |
|---|
| 214 |
%% {/angle_de_rot exch def} |
|---|
| 215 |
%% if |
|---|
| 216 |
%% dup isarray |
|---|
| 217 |
%% {/vect_echelle exch def} |
|---|
| 218 |
%% if |
|---|
| 219 |
%% CamView vect_echelle {angle_de_rot} bltexlabel |
|---|
| 220 |
%% end |
|---|
| 221 |
%% } def |
|---|
| 222 |
%% |
|---|
| 223 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 224 |
%% /brtext3d { |
|---|
| 225 |
%% 2 dict begin |
|---|
| 226 |
%% /vect_echelle [1 1] def |
|---|
| 227 |
%% /angle_de_rot {0} def |
|---|
| 228 |
%% dup xcheck |
|---|
| 229 |
%% {/angle_de_rot exch def} |
|---|
| 230 |
%% if |
|---|
| 231 |
%% dup isarray |
|---|
| 232 |
%% {/vect_echelle exch def} |
|---|
| 233 |
%% if |
|---|
| 234 |
%% CamView vect_echelle {angle_de_rot} brtext |
|---|
| 235 |
%% end |
|---|
| 236 |
%% } def |
|---|
| 237 |
%% |
|---|
| 238 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 239 |
%% /brtexlabel3d { |
|---|
| 240 |
%% 2 dict begin |
|---|
| 241 |
%% /vect_echelle [1 1] def |
|---|
| 242 |
%% /angle_de_rot {0} def |
|---|
| 243 |
%% dup xcheck |
|---|
| 244 |
%% {/angle_de_rot exch def} |
|---|
| 245 |
%% if |
|---|
| 246 |
%% dup isarray |
|---|
| 247 |
%% {/vect_echelle exch def} |
|---|
| 248 |
%% if |
|---|
| 249 |
%% CamView vect_echelle {angle_de_rot} brtexlabel |
|---|
| 250 |
%% end |
|---|
| 251 |
%% } def |
|---|
| 252 |
%% |
|---|
| 253 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 254 |
%% /cbtext3d { |
|---|
| 255 |
%% 2 dict begin |
|---|
| 256 |
%% /vect_echelle [1 1] def |
|---|
| 257 |
%% /angle_de_rot {0} def |
|---|
| 258 |
%% dup xcheck |
|---|
| 259 |
%% {/angle_de_rot exch def} |
|---|
| 260 |
%% if |
|---|
| 261 |
%% dup isarray |
|---|
| 262 |
%% {/vect_echelle exch def} |
|---|
| 263 |
%% if |
|---|
| 264 |
%% CamView vect_echelle {angle_de_rot} cbtext |
|---|
| 265 |
%% end |
|---|
| 266 |
%% } def |
|---|
| 267 |
%% |
|---|
| 268 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 269 |
%% /cbtexlabel3d { |
|---|
| 270 |
%% 2 dict begin |
|---|
| 271 |
%% /vect_echelle [1 1] def |
|---|
| 272 |
%% /angle_de_rot {0} def |
|---|
| 273 |
%% dup xcheck |
|---|
| 274 |
%% {/angle_de_rot exch def} |
|---|
| 275 |
%% if |
|---|
| 276 |
%% dup isarray |
|---|
| 277 |
%% {/vect_echelle exch def} |
|---|
| 278 |
%% if |
|---|
| 279 |
%% CamView vect_echelle {angle_de_rot} cbtexlabel |
|---|
| 280 |
%% end |
|---|
| 281 |
%% } def |
|---|
| 282 |
%% |
|---|
| 283 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 284 |
%% /cctext3d { |
|---|
| 285 |
%% 2 dict begin |
|---|
| 286 |
%% /vect_echelle [1 1] def |
|---|
| 287 |
%% /angle_de_rot {0} def |
|---|
| 288 |
%% dup xcheck |
|---|
| 289 |
%% {/angle_de_rot exch def} |
|---|
| 290 |
%% if |
|---|
| 291 |
%% dup isarray |
|---|
| 292 |
%% {/vect_echelle exch def} |
|---|
| 293 |
%% if |
|---|
| 294 |
%% CamView vect_echelle {angle_de_rot} cctext |
|---|
| 295 |
%% end |
|---|
| 296 |
%% } def |
|---|
| 297 |
%% |
|---|
| 298 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 299 |
%% /cctexlabel3d { |
|---|
| 300 |
%% 2 dict begin |
|---|
| 301 |
%% /vect_echelle [1 1] def |
|---|
| 302 |
%% /angle_de_rot {0} def |
|---|
| 303 |
%% dup xcheck |
|---|
| 304 |
%% {/angle_de_rot exch def} |
|---|
| 305 |
%% if |
|---|
| 306 |
%% dup isarray |
|---|
| 307 |
%% {/vect_echelle exch def} |
|---|
| 308 |
%% if |
|---|
| 309 |
%% CamView vect_echelle {angle_de_rot} cctexlabel |
|---|
| 310 |
%% end |
|---|
| 311 |
%% } def |
|---|
| 312 |
%% |
|---|
| 313 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 314 |
%% /cltext3d { |
|---|
| 315 |
%% 2 dict begin |
|---|
| 316 |
%% /vect_echelle [1 1] def |
|---|
| 317 |
%% /angle_de_rot {0} def |
|---|
| 318 |
%% dup xcheck |
|---|
| 319 |
%% {/angle_de_rot exch def} |
|---|
| 320 |
%% if |
|---|
| 321 |
%% dup isarray |
|---|
| 322 |
%% {/vect_echelle exch def} |
|---|
| 323 |
%% if |
|---|
| 324 |
%% CamView vect_echelle {angle_de_rot} cltext |
|---|
| 325 |
%% end |
|---|
| 326 |
%% } def |
|---|
| 327 |
%% |
|---|
| 328 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 329 |
%% /cltexlabel3d { |
|---|
| 330 |
%% 2 dict begin |
|---|
| 331 |
%% /vect_echelle [1 1] def |
|---|
| 332 |
%% /angle_de_rot {0} def |
|---|
| 333 |
%% dup xcheck |
|---|
| 334 |
%% {/angle_de_rot exch def} |
|---|
| 335 |
%% if |
|---|
| 336 |
%% dup isarray |
|---|
| 337 |
%% {/vect_echelle exch def} |
|---|
| 338 |
%% if |
|---|
| 339 |
%% CamView vect_echelle {angle_de_rot} cltexlabel |
|---|
| 340 |
%% end |
|---|
| 341 |
%% } def |
|---|
| 342 |
%% |
|---|
| 343 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 344 |
%% /crtext3d { |
|---|
| 345 |
%% 2 dict begin |
|---|
| 346 |
%% /vect_echelle [1 1] def |
|---|
| 347 |
%% /angle_de_rot {0} def |
|---|
| 348 |
%% dup xcheck |
|---|
| 349 |
%% {/angle_de_rot exch def} |
|---|
| 350 |
%% if |
|---|
| 351 |
%% dup isarray |
|---|
| 352 |
%% {/vect_echelle exch def} |
|---|
| 353 |
%% if |
|---|
| 354 |
%% CamView vect_echelle {angle_de_rot} crtext |
|---|
| 355 |
%% end |
|---|
| 356 |
%% } def |
|---|
| 357 |
%% |
|---|
| 358 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 359 |
%% /crtexlabel3d { |
|---|
| 360 |
%% 2 dict begin |
|---|
| 361 |
%% /vect_echelle [1 1] def |
|---|
| 362 |
%% /angle_de_rot {0} def |
|---|
| 363 |
%% dup xcheck |
|---|
| 364 |
%% {/angle_de_rot exch def} |
|---|
| 365 |
%% if |
|---|
| 366 |
%% dup isarray |
|---|
| 367 |
%% {/vect_echelle exch def} |
|---|
| 368 |
%% if |
|---|
| 369 |
%% CamView vect_echelle {angle_de_rot} crtexlabel |
|---|
| 370 |
%% end |
|---|
| 371 |
%% } def |
|---|
| 372 |
%% |
|---|
| 373 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 374 |
%% /dbtext3d { |
|---|
| 375 |
%% 2 dict begin |
|---|
| 376 |
%% /vect_echelle [1 1] def |
|---|
| 377 |
%% /angle_de_rot {0} def |
|---|
| 378 |
%% dup xcheck |
|---|
| 379 |
%% {/angle_de_rot exch def} |
|---|
| 380 |
%% if |
|---|
| 381 |
%% dup isarray |
|---|
| 382 |
%% {/vect_echelle exch def} |
|---|
| 383 |
%% if |
|---|
| 384 |
%% CamView vect_echelle {angle_de_rot} dbtext |
|---|
| 385 |
%% end |
|---|
| 386 |
%% } def |
|---|
| 387 |
%% |
|---|
| 388 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 389 |
%% /dbtexlabel3d { |
|---|
| 390 |
%% 2 dict begin |
|---|
| 391 |
%% /vect_echelle [1 1] def |
|---|
| 392 |
%% /angle_de_rot {0} def |
|---|
| 393 |
%% dup xcheck |
|---|
| 394 |
%% {/angle_de_rot exch def} |
|---|
| 395 |
%% if |
|---|
| 396 |
%% dup isarray |
|---|
| 397 |
%% {/vect_echelle exch def} |
|---|
| 398 |
%% if |
|---|
| 399 |
%% CamView vect_echelle {angle_de_rot} dbtexlabel |
|---|
| 400 |
%% end |
|---|
| 401 |
%% } def |
|---|
| 402 |
%% |
|---|
| 403 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 404 |
%% /dctext3d { |
|---|
| 405 |
%% 2 dict begin |
|---|
| 406 |
%% /vect_echelle [1 1] def |
|---|
| 407 |
%% /angle_de_rot {0} def |
|---|
| 408 |
%% dup xcheck |
|---|
| 409 |
%% {/angle_de_rot exch def} |
|---|
| 410 |
%% if |
|---|
| 411 |
%% dup isarray |
|---|
| 412 |
%% {/vect_echelle exch def} |
|---|
| 413 |
%% if |
|---|
| 414 |
%% CamView vect_echelle {angle_de_rot} dctext |
|---|
| 415 |
%% end |
|---|
| 416 |
%% } def |
|---|
| 417 |
%% |
|---|
| 418 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 419 |
%% /dctexlabel3d { |
|---|
| 420 |
%% 2 dict begin |
|---|
| 421 |
%% /vect_echelle [1 1] def |
|---|
| 422 |
%% /angle_de_rot {0} def |
|---|
| 423 |
%% dup xcheck |
|---|
| 424 |
%% {/angle_de_rot exch def} |
|---|
| 425 |
%% if |
|---|
| 426 |
%% dup isarray |
|---|
| 427 |
%% {/vect_echelle exch def} |
|---|
| 428 |
%% if |
|---|
| 429 |
%% CamView vect_echelle {angle_de_rot} dctexlabel |
|---|
| 430 |
%% end |
|---|
| 431 |
%% } def |
|---|
| 432 |
%% |
|---|
| 433 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 434 |
%% /dltext3d { |
|---|
| 435 |
%% 2 dict begin |
|---|
| 436 |
%% /vect_echelle [1 1] def |
|---|
| 437 |
%% /angle_de_rot {0} def |
|---|
| 438 |
%% dup xcheck |
|---|
| 439 |
%% {/angle_de_rot exch def} |
|---|
| 440 |
%% if |
|---|
| 441 |
%% dup isarray |
|---|
| 442 |
%% {/vect_echelle exch def} |
|---|
| 443 |
%% if |
|---|
| 444 |
%% CamView vect_echelle {angle_de_rot} dltext |
|---|
| 445 |
%% end |
|---|
| 446 |
%% } def |
|---|
| 447 |
%% |
|---|
| 448 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 449 |
%% /dltexlabel3d { |
|---|
| 450 |
%% 2 dict begin |
|---|
| 451 |
%% /vect_echelle [1 1] def |
|---|
| 452 |
%% /angle_de_rot {0} def |
|---|
| 453 |
%% dup xcheck |
|---|
| 454 |
%% {/angle_de_rot exch def} |
|---|
| 455 |
%% if |
|---|
| 456 |
%% dup isarray |
|---|
| 457 |
%% {/vect_echelle exch def} |
|---|
| 458 |
%% if |
|---|
| 459 |
%% CamView vect_echelle {angle_de_rot} dltexlabel |
|---|
| 460 |
%% end |
|---|
| 461 |
%% } def |
|---|
| 462 |
%% |
|---|
| 463 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 464 |
%% /ubtext3d { |
|---|
| 465 |
%% 2 dict begin |
|---|
| 466 |
%% /vect_echelle [1 1] def |
|---|
| 467 |
%% /angle_de_rot {0} def |
|---|
| 468 |
%% dup xcheck |
|---|
| 469 |
%% {/angle_de_rot exch def} |
|---|
| 470 |
%% if |
|---|
| 471 |
%% dup isarray |
|---|
| 472 |
%% {/vect_echelle exch def} |
|---|
| 473 |
%% if |
|---|
| 474 |
%% CamView vect_echelle {angle_de_rot} ubtext |
|---|
| 475 |
%% end |
|---|
| 476 |
%% } def |
|---|
| 477 |
%% |
|---|
| 478 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 479 |
%% /ubtexlabel3d { |
|---|
| 480 |
%% 2 dict begin |
|---|
| 481 |
%% /vect_echelle [1 1] def |
|---|
| 482 |
%% /angle_de_rot {0} def |
|---|
| 483 |
%% dup xcheck |
|---|
| 484 |
%% {/angle_de_rot exch def} |
|---|
| 485 |
%% if |
|---|
| 486 |
%% dup isarray |
|---|
| 487 |
%% {/vect_echelle exch def} |
|---|
| 488 |
%% if |
|---|
| 489 |
%% CamView vect_echelle {angle_de_rot} ubtexlabel |
|---|
| 490 |
%% end |
|---|
| 491 |
%% } def |
|---|
| 492 |
%% |
|---|
| 493 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 494 |
%% /uctext3d { |
|---|
| 495 |
%% 2 dict begin |
|---|
| 496 |
%% /vect_echelle [1 1] def |
|---|
| 497 |
%% /angle_de_rot {0} def |
|---|
| 498 |
%% dup xcheck |
|---|
| 499 |
%% {/angle_de_rot exch def} |
|---|
| 500 |
%% if |
|---|
| 501 |
%% dup isarray |
|---|
| 502 |
%% {/vect_echelle exch def} |
|---|
| 503 |
%% if |
|---|
| 504 |
%% CamView vect_echelle {angle_de_rot} uctext |
|---|
| 505 |
%% end |
|---|
| 506 |
%% } def |
|---|
| 507 |
%% |
|---|
| 508 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 509 |
%% /uctexlabel3d { |
|---|
| 510 |
%% 2 dict begin |
|---|
| 511 |
%% /vect_echelle [1 1] def |
|---|
| 512 |
%% /angle_de_rot {0} def |
|---|
| 513 |
%% dup xcheck |
|---|
| 514 |
%% {/angle_de_rot exch def} |
|---|
| 515 |
%% if |
|---|
| 516 |
%% dup isarray |
|---|
| 517 |
%% {/vect_echelle exch def} |
|---|
| 518 |
%% if |
|---|
| 519 |
%% CamView vect_echelle {angle_de_rot} uctexlabel |
|---|
| 520 |
%% end |
|---|
| 521 |
%% } def |
|---|
| 522 |
%% |
|---|
| 523 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 524 |
%% /ultext3d { |
|---|
| 525 |
%% 2 dict begin |
|---|
| 526 |
%% /vect_echelle [1 1] def |
|---|
| 527 |
%% /angle_de_rot {0} def |
|---|
| 528 |
%% dup xcheck |
|---|
| 529 |
%% {/angle_de_rot exch def} |
|---|
| 530 |
%% if |
|---|
| 531 |
%% dup isarray |
|---|
| 532 |
%% {/vect_echelle exch def} |
|---|
| 533 |
%% if |
|---|
| 534 |
%% CamView vect_echelle {angle_de_rot} ultext |
|---|
| 535 |
%% end |
|---|
| 536 |
%% } def |
|---|
| 537 |
%% |
|---|
| 538 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 539 |
%% /ultexlabel3d { |
|---|
| 540 |
%% 2 dict begin |
|---|
| 541 |
%% /vect_echelle [1 1] def |
|---|
| 542 |
%% /angle_de_rot {0} def |
|---|
| 543 |
%% dup xcheck |
|---|
| 544 |
%% {/angle_de_rot exch def} |
|---|
| 545 |
%% if |
|---|
| 546 |
%% dup isarray |
|---|
| 547 |
%% {/vect_echelle exch def} |
|---|
| 548 |
%% if |
|---|
| 549 |
%% CamView vect_echelle {angle_de_rot} ultexlabel |
|---|
| 550 |
%% end |
|---|
| 551 |
%% } def |
|---|
| 552 |
%% |
|---|
| 553 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 554 |
%% /urtext3d { |
|---|
| 555 |
%% 2 dict begin |
|---|
| 556 |
%% /vect_echelle [1 1] def |
|---|
| 557 |
%% /angle_de_rot {0} def |
|---|
| 558 |
%% dup xcheck |
|---|
| 559 |
%% {/angle_de_rot exch def} |
|---|
| 560 |
%% if |
|---|
| 561 |
%% dup isarray |
|---|
| 562 |
%% {/vect_echelle exch def} |
|---|
| 563 |
%% if |
|---|
| 564 |
%% CamView vect_echelle {angle_de_rot} urtext |
|---|
| 565 |
%% end |
|---|
| 566 |
%% } def |
|---|
| 567 |
%% |
|---|
| 568 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 569 |
%% /urtexlabel3d { |
|---|
| 570 |
%% 2 dict begin |
|---|
| 571 |
%% /vect_echelle [1 1] def |
|---|
| 572 |
%% /angle_de_rot {0} def |
|---|
| 573 |
%% dup xcheck |
|---|
| 574 |
%% {/angle_de_rot exch def} |
|---|
| 575 |
%% if |
|---|
| 576 |
%% dup isarray |
|---|
| 577 |
%% {/vect_echelle exch def} |
|---|
| 578 |
%% if |
|---|
| 579 |
%% CamView vect_echelle {angle_de_rot} urtexlabel |
|---|
| 580 |
%% end |
|---|
| 581 |
%% } def |
|---|
| 582 |
%% |
|---|
| 583 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 584 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 585 |
%% %%%% Version 3d des commandes jps GEOMETRIQUES |
|---|
| 586 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 587 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 588 |
%% |
|---|
| 589 |
%% |
|---|
| 590 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 591 |
%% /ligne3d { %% [tableau de points3d] option --> trace la ligne brisée |
|---|
| 592 |
%% 1 dict begin |
|---|
| 593 |
%% dup isstring |
|---|
| 594 |
%% {/option exch def} |
|---|
| 595 |
%% if |
|---|
| 596 |
%% tab3dto2d |
|---|
| 597 |
%% currentdict /option known |
|---|
| 598 |
%% {option} |
|---|
| 599 |
%% if |
|---|
| 600 |
%% ligne |
|---|
| 601 |
%% end |
|---|
| 602 |
%% } def |
|---|
| 603 |
%% |
|---|
| 604 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 605 |
%% /plus3d { %% A |
|---|
| 606 |
%% CamView plus |
|---|
| 607 |
%% } def |
|---|
| 608 |
%% |
|---|
| 609 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 610 |
%% /point3d { %% A |
|---|
| 611 |
%% CamView point |
|---|
| 612 |
%% } def |
|---|
| 613 |
%% |
|---|
| 614 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 615 |
%% /points3d { %% tableau de points3d |
|---|
| 616 |
%% tab3dto2d points |
|---|
| 617 |
%% } def |
|---|
| 618 |
%% |
|---|
| 619 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 620 |
%% /polygone3d { %% tableau de points3d |
|---|
| 621 |
%% tab3dto2d polygone |
|---|
| 622 |
%% } def |
|---|
| 623 |
%% |
|---|
| 624 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 625 |
%% /polygone*3d { %% tableau de points3d |
|---|
| 626 |
%% tab3dto2d polygone* |
|---|
| 627 |
%% } def |
|---|
| 628 |
%% |
|---|
| 629 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 630 |
%% /surfaceparam3d { %% x_min pas_x x_max y_min pas_x y_max {Proc} |
|---|
| 631 |
%% 9 dict begin |
|---|
| 632 |
%% /z@xy exch def |
|---|
| 633 |
%% /y1 exch def |
|---|
| 634 |
%% /yp exch def |
|---|
| 635 |
%% /y0 exch def |
|---|
| 636 |
%% /x1 exch def |
|---|
| 637 |
%% /xp exch def |
|---|
| 638 |
%% /x0 exch def |
|---|
| 639 |
%% x0 xp x1 { |
|---|
| 640 |
%% /x exch def |
|---|
| 641 |
%% y0 y1 {x exch 2 copy z@xy CamView pop} {x exch 2 copy z@xy CamView exch pop} Courbeparam |
|---|
| 642 |
%% } for |
|---|
| 643 |
%% y0 yp y1 { |
|---|
| 644 |
%% /y exch def |
|---|
| 645 |
%% x0 x1 {y 2 copy z@xy CamView pop} {y 2 copy z@xy CamView exch pop} Courbeparam |
|---|
| 646 |
%% } for |
|---|
| 647 |
%% end |
|---|
| 648 |
%% } def |
|---|
| 649 |
%% |
|---|
| 650 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 651 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 652 |
%% %%%% Commandes spécifiques 3d |
|---|
| 653 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 654 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 655 |
%% |
|---|
| 656 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 657 |
%% /qplanxy { %% trace un quadrillage du plan XY |
|---|
| 658 |
%% gsave |
|---|
| 659 |
%% 190 255 div 190 255 div 200 255 div setrgbcolor |
|---|
| 660 |
%% -5 1 5 { |
|---|
| 661 |
%% 1 dict begin |
|---|
| 662 |
%% /i exch def |
|---|
| 663 |
%% [i -5 0 i 5 0] (-) ligne3d |
|---|
| 664 |
%% [-5 i 0 5 i 0] (-) ligne3d |
|---|
| 665 |
%% end |
|---|
| 666 |
%% } for |
|---|
| 667 |
%% grestore } def |
|---|
| 668 |
%% |
|---|
| 669 |
%% /quadrilleXYZ { %% x_min x_max y_min y_max z_min z_max |
|---|
| 670 |
%% 9 dict begin |
|---|
| 671 |
%% /z1 exch def |
|---|
| 672 |
%% /z0 exch def |
|---|
| 673 |
%% /y1 exch def |
|---|
| 674 |
%% /y0 exch def |
|---|
| 675 |
%% /x1 exch def |
|---|
| 676 |
%% /x0 exch def |
|---|
| 677 |
%% x0 1 x1 { |
|---|
| 678 |
%% /i exch def |
|---|
| 679 |
%% y0 1 y1 { |
|---|
| 680 |
%% /j exch def |
|---|
| 681 |
%% [i j z0 i j z1] (-) ligne3d |
|---|
| 682 |
%% } for |
|---|
| 683 |
%% } for |
|---|
| 684 |
%% x0 1 x1 { |
|---|
| 685 |
%% /i exch def |
|---|
| 686 |
%% z0 1 z1 { |
|---|
| 687 |
%% /k exch def |
|---|
| 688 |
%% [i y0 k i y1 k] (-) ligne3d |
|---|
| 689 |
%% } for |
|---|
| 690 |
%% } for |
|---|
| 691 |
%% y0 1 y1 { |
|---|
| 692 |
%% /j exch def |
|---|
| 693 |
%% z0 1 z1 { |
|---|
| 694 |
%% /k exch def |
|---|
| 695 |
%% [x0 j k x1 j k] (-) ligne3d |
|---|
| 696 |
%% } for |
|---|
| 697 |
%% } for |
|---|
| 698 |
%% end |
|---|
| 699 |
%% } def |
|---|
| 700 |
%% |
|---|
| 701 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 702 |
%% /axeR { % x_min x_max lu (étendue du pointille, longueur du vecteur) |
|---|
| 703 |
%% 3 dict begin |
|---|
| 704 |
%% /lu exch def |
|---|
| 705 |
%% /x1 exch def |
|---|
| 706 |
%% /x0 exch def |
|---|
| 707 |
%% gsave |
|---|
| 708 |
%% continu |
|---|
| 709 |
%% rouge |
|---|
| 710 |
%% [0 0 0 lu 0 0] (->) ligne3d |
|---|
| 711 |
%% currentlinewidth 0.5 mul setlinewidth |
|---|
| 712 |
%% pointilles |
|---|
| 713 |
%% [x0 0 0 x1 0 0] (-) ligne3d |
|---|
| 714 |
%% grestore |
|---|
| 715 |
%% end } def |
|---|
| 716 |
%% |
|---|
| 717 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 718 |
%% /axeV { % y_min y_max lu (étendue du pointille, longueur du vecteur) |
|---|
| 719 |
%% 3 dict begin |
|---|
| 720 |
%% /lu exch def |
|---|
| 721 |
%% /y1 exch def |
|---|
| 722 |
%% /y0 exch def |
|---|
| 723 |
%% gsave |
|---|
| 724 |
%% continu |
|---|
| 725 |
%% vert |
|---|
| 726 |
%% [0 0 0 0 lu 0] (->) ligne3d |
|---|
| 727 |
%% currentlinewidth 0.5 mul setlinewidth |
|---|
| 728 |
%% pointilles |
|---|
| 729 |
%% [0 y0 0 0 y1 0] (-) ligne3d |
|---|
| 730 |
%% grestore |
|---|
| 731 |
%% end } def |
|---|
| 732 |
%% |
|---|
| 733 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 734 |
%% /axeB { % z_min z_max lu (étendue du pointille, longueur du vecteur) |
|---|
| 735 |
%% 3 dict begin |
|---|
| 736 |
%% /lu exch def |
|---|
| 737 |
%% /z1 exch def |
|---|
| 738 |
%% /z0 exch def |
|---|
| 739 |
%% gsave |
|---|
| 740 |
%% continu |
|---|
| 741 |
%% bleu |
|---|
| 742 |
%% [0 0 0 0 0 lu] (->) ligne3d |
|---|
| 743 |
%% currentlinewidth 0.5 mul setlinewidth |
|---|
| 744 |
%% pointilles |
|---|
| 745 |
%% [0 0 z0 0 0 z1] (-) ligne3d |
|---|
| 746 |
%% grestore |
|---|
| 747 |
%% end } def |
|---|
| 748 |
%% |
|---|
| 749 |
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|---|
| 750 |
%% /axesRVB { % xyz_min xyz_max lu (étendue du pointille, longueur des vecteurs) |
|---|
| 751 |
%% 3 dict begin |
|---|
| 752 |
%% /lu exch def |
|---|
| 753 |
%% /w1 exch def |
|---|
| 754 |
%% /w0 exch def |
|---|
| 755 |
%% w0 w1 lu axeR |
|---|
| 756 |
%% w0 w1 lu axeV |
|---|
| 757 |
%% w0 w1 lu axeB |
|---|
| 758 |
%% } def |
|---|
| 759 |
%% |
|---|
| 760 |
%% %% 6 -6 4 SetCamPos |
|---|
| 761 |
%% %% 1 1.1 -0.3 SetCamVec |
|---|
| 762 |
%% %% .03 0.03 1 SetCamUp |
|---|
| 763 |
%% %% ComputeCamera |
|---|
| 764 |
|
|---|
| 765 |
|
|---|
| 766 |
|
|---|
| 767 |
|
|---|
| 768 |
|
|---|
| 769 |
|
|---|
| 770 |
|
|---|