/usr/share/doc/racket/deinprogramm/line3d.html is in racket-doc 6.7-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>10 3D-Liniengraphik: "line3d.ss"</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Sprachebenen und Material zu <span style="font-style: italic">Die Macht der Abstraktion</span></a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="DMdA-beginner.html" class="tocviewlink" data-pltdoc="x">Die Macht der Abstraktion -<wbr></wbr> Anfänger</a></td></tr><tr><td align="right">2 </td><td><a href="DMdA-vanilla.html" class="tocviewlink" data-pltdoc="x">Die Macht der Abstraktion</a></td></tr><tr><td align="right">3 </td><td><a href="DMdA-assignments.html" class="tocviewlink" data-pltdoc="x">Die Macht der Abstraktion mit Zuweisungen</a></td></tr><tr><td align="right">4 </td><td><a href="DMdA-advanced.html" class="tocviewlink" data-pltdoc="x">Die Macht der Abstraktion fortgeschritten</a></td></tr><tr><td align="right">5 </td><td><a href="Konstruktionsanleitungen_1_bis_10.html" class="tocviewlink" data-pltdoc="x">Konstruktionsanleitungen 1 bis 10</a></td></tr><tr><td align="right">6 </td><td><a href="image.html" class="tocviewlink" data-pltdoc="x">Bilder konstruieren:<span class="mywbr"> </span> <span class="stt">"image.ss"</span><a name="(idx._(gentag._2._(lib._deinprogramm/scribblings/deinprogramm..scrbl)))"></a></a></td></tr><tr><td align="right">7 </td><td><a href="world.html" class="tocviewlink" data-pltdoc="x">Animationen:<span class="mywbr"> </span> <span class="stt">"world.ss"</span><a name="(idx._(gentag._3._(lib._deinprogramm/scribblings/deinprogramm..scrbl)))"></a></a></td></tr><tr><td align="right">8 </td><td><a href="turtle.html" class="tocviewlink" data-pltdoc="x">Turtle-<wbr></wbr>Grafik:<span class="mywbr"> </span> <span class="stt">"turtle.ss"</span><a name="(idx._(gentag._4._(lib._deinprogramm/scribblings/deinprogramm..scrbl)))"></a></a></td></tr><tr><td align="right">9 </td><td><a href="sound.html" class="tocviewlink" data-pltdoc="x">Abspielen von Audio-<wbr></wbr>Dateien:<span class="mywbr"> </span> <span class="stt">"sound.ss"</span><a name="(idx._(gentag._5._(lib._deinprogramm/scribblings/deinprogramm..scrbl)))"></a></a></td></tr><tr><td align="right">10 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">3D-<wbr></wbr>Liniengraphik:<span class="mywbr"> </span> <span class="stt">"line3d.ss"</span><a name="(idx._(gentag._6._(lib._deinprogramm/scribblings/deinprogramm..scrbl)))"></a></a></td></tr><tr><td align="right">11 </td><td><a href="DMdA__Sprachen_als_Libraries.html" class="tocviewlink" data-pltdoc="x"><span style="font-weight: bold">DMd<span class="mywbr"> </span>A</span>:<span class="mywbr"> </span> Sprachen als Libraries</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>10 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">3D-<wbr></wbr>Liniengraphik:<span class="mywbr"> </span> <span class="stt">"line3d.ss"</span><a name="(idx._(gentag._6._(lib._deinprogramm/scribblings/deinprogramm..scrbl)))"></a></a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">10.1 </td><td><a href="#%28part._rendering%29" class="tocviewlink" data-pltdoc="x">Szenen erzeugen</a></td></tr><tr><td align="right">10.2 </td><td><a href="#%28part._3.Dvectors%29" class="tocviewlink" data-pltdoc="x">3D-<wbr></wbr>Vektoren</a></td></tr><tr><td align="right">10.3 </td><td><a href="#%28part._4.Dvectors%29" class="tocviewlink" data-pltdoc="x">4D-<wbr></wbr>Vektoren</a></td></tr><tr><td align="right">10.4 </td><td><a href="#%28part._4x4matrix%29" class="tocviewlink" data-pltdoc="x">4x4 Matrizen</a></td></tr><tr><td align="right">10.5 </td><td><a href="#%28part._3dline%29" class="tocviewlink" data-pltdoc="x">3d-<wbr></wbr>Linien</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">10.1<tt> </tt></span><a href="#%28part._rendering%29" class="tocsubseclink" data-pltdoc="x">Szenen erzeugen</a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._render-scene%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">render-<wbr></wbr>scene</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-camera-matrix%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">create-<wbr></wbr>camera-<wbr></wbr>matrix</span></span></a></td></tr><tr><td><span class="tocsublinknumber">10.2<tt> </tt></span><a href="#%28part._3.Dvectors%29" class="tocsubseclink" data-pltdoc="x">3D-<wbr></wbr>Vektoren</a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._vec3%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym">vec3</span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-vec3%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>vec3</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._add-vec3%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">add-<wbr></wbr>vec3</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._sub-vec3%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">sub-<wbr></wbr>vec3</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._mult-vec3%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">mult-<wbr></wbr>vec3</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._div-vec3%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">div-<wbr></wbr>vec3</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._dotproduct-vec3%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">dotproduct-<wbr></wbr>vec3</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._norm.Quad-vec3%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym">norm<span class="mywbr"> </span>Quad-<wbr></wbr>vec3</span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._norm-vec3%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">norm-<wbr></wbr>vec3</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._normalize-vec3%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">normalize-<wbr></wbr>vec3</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._crossproduct-vec3%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">crossproduct-<wbr></wbr>vec3</span></span></a></td></tr><tr><td><span class="tocsublinknumber">10.3<tt> </tt></span><a href="#%28part._4.Dvectors%29" class="tocsubseclink" data-pltdoc="x">4D-<wbr></wbr>Vektoren</a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._vec4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym">vec4</span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-vec4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>vec4</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._add-vec4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">add-<wbr></wbr>vec4</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._sub-vec4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">sub-<wbr></wbr>vec4</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._mult-vec4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">mult-<wbr></wbr>vec4</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._div-vec4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">div-<wbr></wbr>vec4</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._dotproduct-vec4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">dotproduct-<wbr></wbr>vec4</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._norm.Quad-vec4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym">norm<span class="mywbr"> </span>Quad-<wbr></wbr>vec4</span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._norm-vec4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">norm-<wbr></wbr>vec4</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._normalize-vec4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">normalize-<wbr></wbr>vec4</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._expand-vec3%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">expand-<wbr></wbr>vec3</span></span></a></td></tr><tr><td><span class="tocsublinknumber">10.4<tt> </tt></span><a href="#%28part._4x4matrix%29" class="tocsubseclink" data-pltdoc="x">4x4 Matrizen</a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._matrix4x4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym">matrix4x4</span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-matrix4x4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>matrix4x4</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-matrix4x4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">create-<wbr></wbr>matrix4x4</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._transpose-matrix4x4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">transpose-<wbr></wbr>matrix4x4</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._multiply-matrix-vec4%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">multiply-<wbr></wbr>matrix-<wbr></wbr>vec4</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._transform-vec3%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">transform-<wbr></wbr>vec3</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._multiply-matrix%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">multiply-<wbr></wbr>matrix</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-translation-matrix%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">create-<wbr></wbr>translation-<wbr></wbr>matrix</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-rotation-x-matrix%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">create-<wbr></wbr>rotation-<wbr></wbr>x-<wbr></wbr>matrix</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-rotation-y-matrix%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">create-<wbr></wbr>rotation-<wbr></wbr>y-<wbr></wbr>matrix</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-rotation-z-matrix%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">create-<wbr></wbr>rotation-<wbr></wbr>z-<wbr></wbr>matrix</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-lookat-matrix%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">create-<wbr></wbr>lookat-<wbr></wbr>matrix</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-projection-matrix%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">create-<wbr></wbr>projection-<wbr></wbr>matrix</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-viewport-matrix%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">create-<wbr></wbr>viewport-<wbr></wbr>matrix</span></span></a></td></tr><tr><td><span class="tocsublinknumber">10.5<tt> </tt></span><a href="#%28part._3dline%29" class="tocsubseclink" data-pltdoc="x">3d-<wbr></wbr>Linien</a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._line3d%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym">line3d</span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-line3d%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>line3d</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._line3d-a%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">line3d-<wbr></wbr>a</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._line3d-b%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">line3d-<wbr></wbr>b</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._line3d-color%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">line3d-<wbr></wbr>color</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-box%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">create-<wbr></wbr>box</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._transform-primitive-list%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">transform-<wbr></wbr>primitive-<wbr></wbr>list</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="sound.html" title="backward to "9 Abspielen von Audio-Dateien: "sound.ss""" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Sprachebenen und Material zu Die Macht der Abstraktion"" data-pltdoc="x">up</a> <a href="DMdA__Sprachen_als_Libraries.html" title="forward to "11 DMdA: Sprachen als Libraries"" data-pltdoc="x">next →</a></span> </div><h3 x-source-module="(lib "deinprogramm/scribblings/deinprogramm.scrbl")" x-source-pkg="deinprogramm" x-part-tag=""line3d"">10<tt> </tt><a name="(part._line3d)"></a>3D-Liniengraphik: <span class="stt">"line3d.ss"</span><a name="(idx._(gentag._6._(lib._deinprogramm/scribblings/deinprogramm..scrbl)))"></a></h3><p>Note: This is documentation for the <span class="stt">"line3d.rkt"</span> teachpack that goes
with the German textbook
<span style="font-style: italic"><a href="http://www.deinprogramm.de/dmda/">Die Macht der
Abstraktion</a></span>.</p><p>Dieses teachpack definiert Prozeduren für lineare Algebra und 3D-Rendering:</p><h4 x-source-module="(lib "deinprogramm/scribblings/deinprogramm.scrbl")" x-source-pkg="deinprogramm" x-part-tag=""rendering"">10.1<tt> </tt><a name="(part._rendering)"></a>Szenen erzeugen</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._render-scene))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._render-scene%29%29" class="RktValDef RktValLink" data-pltdoc="x">render-scene</a></span></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">natural</span><span class="hspace"> </span><span class="RktSym">natural</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">list-of</span><span class="hspace"> </span><span class="RktSym">line3d</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">matrix4x4</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="image.html#%28def._%28%28lib._deinprogramm%2Fimage..rkt%29._image%29%29" class="RktValLink" data-pltdoc="x">image</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Der Aufruf <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._render-scene%29%29" class="RktValLink" data-pltdoc="x">render-scene</a></span><span class="stt"> </span><span class="RktSym">width</span><span class="stt"> </span><span class="RktSym">height</span><span class="stt"> </span><span class="RktSym">scene</span><span class="stt"> </span><span class="RktSym">camera-matrix</span><span class="RktPn">)</span>erzeugt die Szene
in ein Bild mit Breite <span class="RktSym">width</span> und Höhe <span class="RktSym">height</span>. Position,
Orientierung und Projektion werden durch die <span class="RktSym">camera-matrix</span> festgelegt.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._create-camera-matrix))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-camera-matrix%29%29" class="RktValDef RktValLink" data-pltdoc="x">create-camera-matrix</a></span></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym">natural</span><span class="hspace"> </span><span class="RktSym">natural</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">matrix4x4</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Der Aufruf <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-camera-matrix%29%29" class="RktValLink" data-pltdoc="x">create-camera-matrix</a></span><span class="stt"> </span><span class="RktSym">position</span><span class="stt"> </span><span class="RktSym">lookat</span><span class="stt"> </span><span class="RktSym">vertical-fov</span><span class="stt"> </span><span class="RktSym">width</span><span class="stt"> </span><span class="RktSym">height</span><span class="RktPn">)</span>
erzeugt eine 4x4 Matrix. Diese kodiert eine Kamera an der Position <span class="RktSym">position</span>, die
auf die Position <span class="RktSym">lookat</span> schaut.
<span class="RktSym">vertical-fov</span> bezeichnet das <a name="(tech._vertikale._feld)"></a><span style="font-style: italic">vertikale Feld</span> der Szene.</div></p><p>Zum Beispiel:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">scene-data (simple box example)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=boxes.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._box%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">box</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-box%29%29" class="RktValLink" data-pltdoc="x">create-box</a></span><span class="hspace"> </span><span class="RktVal">1.0</span><span class="hspace"> </span><span class="RktVal">1.0</span><span class="hspace"> </span><span class="RktVal">1.0</span><span class="hspace"> </span><span class="RktVal">"brown"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">screen</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">screenWidth</span><span class="hspace"> </span><span class="RktVal">320</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">screenHeight</span><span class="hspace"> </span><span class="RktVal">240</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">camera</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">pos</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-vec3%29%29" class="RktValLink" data-pltdoc="x">make-vec3</a></span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktVal">5</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">lookat</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-vec3%29%29" class="RktValLink" data-pltdoc="x">make-vec3</a></span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">0</span><span class="hspace"> </span><span class="RktVal">0</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">camera</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-camera-matrix%29%29" class="RktValLink" data-pltdoc="x">create-camera-matrix</a></span><span class="hspace"> </span><span class="RktSym">pos</span><span class="hspace"> </span><span class="RktSym">lookat</span><span class="hspace"> </span><span class="RktVal">70.0</span><span class="hspace"> </span><span class="RktSym">screenWidth</span><span class="hspace"> </span><span class="RktSym">screenHeight</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">render image</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._render-scene%29%29" class="RktValLink" data-pltdoc="x">render-scene</a></span><span class="hspace"> </span><span class="RktSym">screenWidth</span><span class="hspace"> </span><span class="RktSym">screenHeight</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=boxes.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._box%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">box</a></span><span class="hspace"> </span><span class="RktSym">camera</span><span class="RktPn">)</span></td></tr></table></blockquote><h4 x-source-module="(lib "deinprogramm/scribblings/deinprogramm.scrbl")" x-source-pkg="deinprogramm" x-part-tag=""3Dvectors"">10.2<tt> </tt><a name="(part._3.Dvectors)"></a>3D-Vektoren</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._vec3))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><span class="RktSymDef RktSym">vec3</span></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">signature</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Ein <a name="(tech._3d._vektor)"></a><span style="font-style: italic">3D-Vektor</span> (Name: <span class="RktSym">vec3</span>) ist ein Record, der durch den Aufruf <span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-vec3%29%29" class="RktValLink" data-pltdoc="x">make-vec3</a></span> erstellt wird.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._make-vec3))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-vec3%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-vec3</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-vec3%29%29" class="RktValLink" data-pltdoc="x">make-vec3</a></span><span class="stt"> </span><span class="RktSym">x</span><span class="stt"> </span><span class="RktSym">y</span><span class="stt"> </span><span class="RktSym">z</span><span class="RktPn">)</span> erstellt einen Vektor (x,y,z).</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._add-vec3))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._add-vec3%29%29" class="RktValDef RktValLink" data-pltdoc="x">add-vec3</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._add-vec3%29%29" class="RktValLink" data-pltdoc="x">add-vec3</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">b</span><span class="RktPn">)</span> gibt die Summe von <span class="RktSym">a</span> und <span class="RktSym">b</span> zurück.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._sub-vec3))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._sub-vec3%29%29" class="RktValDef RktValLink" data-pltdoc="x">sub-vec3</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._sub-vec3%29%29" class="RktValLink" data-pltdoc="x">sub-vec3</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">b</span><span class="RktPn">)</span> gibt die Differenz zwischen <span class="RktSym">a</span> und <span class="RktSym">b</span> zurück.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._mult-vec3))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._mult-vec3%29%29" class="RktValDef RktValLink" data-pltdoc="x">mult-vec3</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._mult-vec3%29%29" class="RktValLink" data-pltdoc="x">mult-vec3</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">s</span><span class="RktPn">)</span> gibt den das Produkt von <span class="RktSym">a</span> und <span class="RktSym">s</span> zurück.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._div-vec3))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._div-vec3%29%29" class="RktValDef RktValLink" data-pltdoc="x">div-vec3</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._div-vec3%29%29" class="RktValLink" data-pltdoc="x">div-vec3</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">s</span><span class="RktPn">)</span> gibt den das Produkt von <span class="RktSym">a</span> und dem Kehrwert von <span class="RktSym">s</span> zurück.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._dotproduct-vec3))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._dotproduct-vec3%29%29" class="RktValDef RktValLink" data-pltdoc="x">dotproduct-vec3</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">number</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._dotproduct-vec3%29%29" class="RktValLink" data-pltdoc="x">dotproduct-vec3</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">b</span><span class="RktPn">)</span> gibt das Produkt von <span class="RktSym">a</span> und <span class="RktSym">b</span> zurück.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._norm.Quad-vec3))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><span class="RktSymDef RktSym">normQuad-vec3</span></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">number</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym">normQuad-vec3</span><span class="stt"> </span><span class="RktSym">a</span><span class="RktPn">)</span> gibt die quadrierte Norm/Länge |<span class="RktSym">a</span>|² eines Vektors <span class="RktSym">a</span> zurück (Quadrat der Euklidischen Norm.)</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._norm-vec3))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._norm-vec3%29%29" class="RktValDef RktValLink" data-pltdoc="x">norm-vec3</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">number</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._norm-vec3%29%29" class="RktValLink" data-pltdoc="x">norm-vec3</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="RktPn">)</span> gibt die Norm/Länge |<span class="RktSym">a</span>| eines Vektors a zurück (Euklidische Norm.)</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._normalize-vec3))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._normalize-vec3%29%29" class="RktValDef RktValLink" data-pltdoc="x">normalize-vec3</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._normalize-vec3%29%29" class="RktValLink" data-pltdoc="x">normalize-vec3</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="RktPn">)</span> normalisiert <span class="RktSym">a</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._crossproduct-vec3))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._crossproduct-vec3%29%29" class="RktValDef RktValLink" data-pltdoc="x">crossproduct-vec3</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">vec3-></span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._crossproduct-vec3%29%29" class="RktValLink" data-pltdoc="x">crossproduct-vec3</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">b</span><span class="RktPn">)</span> gibt das Kreuzprodukt von <span class="RktSym">a</span>
und <span class="RktSym">b</span> zurück (einen Vektor der senkrecht auf <span class="RktSym">a</span> und <span class="RktSym">b</span> steht).</div></p><h4 x-source-module="(lib "deinprogramm/scribblings/deinprogramm.scrbl")" x-source-pkg="deinprogramm" x-part-tag=""4Dvectors"">10.3<tt> </tt><a name="(part._4.Dvectors)"></a>4D-Vektoren</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._vec4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><span class="RktSymDef RktSym">vec4</span></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">signature</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Ein <a name="(tech._4d._vektor)"></a><span style="font-style: italic">4D-Vektor</span> <span class="RktSym">vec4</span> ist ein 4D-Vektor. Folgende Prozeduren werden bereitgestellt:</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._make-vec4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-vec4%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-vec4</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-vec4%29%29" class="RktValLink" data-pltdoc="x">make-vec4</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">b</span><span class="stt"> </span><span class="RktSym">c</span><span class="stt"> </span><span class="RktSym">d</span><span class="RktPn">)</span> erzeugt einen Vektor aus <span class="RktSym">a</span>, <span class="RktSym">b</span>, <span class="RktSym">c</span> und <span class="RktSym">d</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._add-vec4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._add-vec4%29%29" class="RktValDef RktValLink" data-pltdoc="x">add-vec4</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._add-vec4%29%29" class="RktValLink" data-pltdoc="x">add-vec4</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">b</span><span class="RktPn">)</span> gibt die Summe von <span class="RktSym">a</span> und <span class="RktSym">b</span> zurück.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._sub-vec4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._sub-vec4%29%29" class="RktValDef RktValLink" data-pltdoc="x">sub-vec4</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._sub-vec4%29%29" class="RktValLink" data-pltdoc="x">sub-vec4</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">b</span><span class="RktPn">)</span> gibt die Differenz zwischen <span class="RktSym">a</span> und <span class="RktSym">b</span> zurück.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._mult-vec4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._mult-vec4%29%29" class="RktValDef RktValLink" data-pltdoc="x">mult-vec4</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._mult-vec4%29%29" class="RktValLink" data-pltdoc="x">mult-vec4</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">s</span><span class="RktPn">)</span> gibt den das Produkt von <span class="RktSym">a</span> und <span class="RktSym">s</span> zurück.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._div-vec4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._div-vec4%29%29" class="RktValDef RktValLink" data-pltdoc="x">div-vec4</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._div-vec4%29%29" class="RktValLink" data-pltdoc="x">div-vec4</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">s</span><span class="RktPn">)</span> gibt den das Produkt von <span class="RktSym">a</span> und dem Kehrwert von <span class="RktSym">s</span> zurück.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._dotproduct-vec4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._dotproduct-vec4%29%29" class="RktValDef RktValLink" data-pltdoc="x">dotproduct-vec4</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">number</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._dotproduct-vec4%29%29" class="RktValLink" data-pltdoc="x">dotproduct-vec4</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">b</span><span class="RktPn">)</span> gibt die quadrierte Norm/Länge |<span class="RktSym">a</span>|² eines Vektors <span class="RktSym">a</span> zurück (Quadrat der Euklidischen Norm.)</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._norm.Quad-vec4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><span class="RktSymDef RktSym">normQuad-vec4</span></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">number</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym">normQuad-vec4</span><span class="stt"> </span><span class="RktSym">a</span><span class="RktPn">)</span> gibt die quadrierte Norm/Länge |<span class="RktSym">a</span>|² eines Vektors <span class="RktSym">a</span> zurück (Quadrat der Euklidischen Norm.)</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._norm-vec4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._norm-vec4%29%29" class="RktValDef RktValLink" data-pltdoc="x">norm-vec4</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">number</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._norm-vec4%29%29" class="RktValLink" data-pltdoc="x">norm-vec4</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="RktPn">)</span> gibt die Norm/Länge |a| eines Vektors a zurück (Euklidische Norm)</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._normalize-vec4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._normalize-vec4%29%29" class="RktValDef RktValLink" data-pltdoc="x">normalize-vec4</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._normalize-vec4%29%29" class="RktValLink" data-pltdoc="x">normalize-vec4</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="RktPn">)</span> normalisiert <span class="RktSym">a</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._expand-vec3))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._expand-vec3%29%29" class="RktValDef RktValLink" data-pltdoc="x">expand-vec3</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._expand-vec3%29%29" class="RktValLink" data-pltdoc="x">expand-vec3</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">s</span><span class="RktPn">)</span> gibt den 4D-Vektor mit <span class="RktSym">s</span> als letze Komponente zurück (erweitert <span class="RktSym">a</span> mit <span class="RktSym">s</span>).</div></p><h4 x-source-module="(lib "deinprogramm/scribblings/deinprogramm.scrbl")" x-source-pkg="deinprogramm" x-part-tag=""4x4matrix"">10.4<tt> </tt><a name="(part._4x4matrix)"></a>4x4 Matrizen</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._matrix4x4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><span class="RktSymDef RktSym">matrix4x4</span></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">signature</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Eine <a name="(tech._matrix)"></a><span style="font-style: italic">Matrix</span> <span class="RktSym">matrix4x4</span> ist ein Record, der durch den Aufruf <span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-matrix4x4%29%29" class="RktValLink" data-pltdoc="x">make-matrix4x4</a></span> erstellt wird.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._make-matrix4x4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-matrix4x4%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-matrix4x4</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">matrix4x4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-matrix4x4%29%29" class="RktValLink" data-pltdoc="x">make-matrix4x4</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">b</span><span class="stt"> </span><span class="RktSym">c</span><span class="stt"> </span><span class="RktSym">d</span><span class="RktPn">)</span> erstellt eine Matrix aus <span class="RktSym">a</span>, <span class="RktSym">b</span>, <span class="RktSym">c</span> und <span class="RktSym">d</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._create-matrix4x4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-matrix4x4%29%29" class="RktValDef RktValLink" data-pltdoc="x">create-matrix4x4</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">matrix4x4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-matrix4x4%29%29" class="RktValLink" data-pltdoc="x">create-matrix4x4</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">b</span><span class="stt"> </span><span class="RktSym">c</span><span class="stt"> </span><span class="RktSym">d</span><span class="RktPn">)</span> erweitert jeden Vektor in einen 4D-Vektor und kombiniert diese zu
einer Matrix <span class="RktSym">a</span>, <span class="RktSym">b</span>, <span class="RktSym">c</span> und <span class="RktSym">d</span>, wobei
<span class="RktSym">a</span>, <span class="RktSym">b</span>, <span class="RktSym">c</span> mit 0 und <span class="RktSym">d</span> mit 1 erweitert wird, um eine homogene Matrix zu erzeugen.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._transpose-matrix4x4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._transpose-matrix4x4%29%29" class="RktValDef RktValLink" data-pltdoc="x">transpose-matrix4x4</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">matrix4x4</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">matrix4x</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._transpose-matrix4x4%29%29" class="RktValLink" data-pltdoc="x">transpose-matrix4x4</a></span><span class="stt"> </span><span class="RktSym">m</span><span class="RktPn">)</span> erstellt die transponierte Matrix <span class="RktSym">m</span>^<span class="RktSym">T</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._multiply-matrix-vec4))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._multiply-matrix-vec4%29%29" class="RktValDef RktValLink" data-pltdoc="x">multiply-matrix-vec4</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">matrix</span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._multiply-matrix-vec4%29%29" class="RktValLink" data-pltdoc="x">multiply-matrix-vec4</a></span><span class="stt"> </span><span class="RktSym">m</span><span class="stt"> </span><span class="RktSym">v</span><span class="RktPn">)</span> gibt die Matrix <span class="RktSym">m</span><span class="RktSym">v</span> zurück. Die <span class="RktSym">w</span>-Komponente ist nicht normalisiert.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._transform-vec3))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._transform-vec3%29%29" class="RktValDef RktValLink" data-pltdoc="x">transform-vec3</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">matrix4x4</span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._transform-vec3%29%29" class="RktValLink" data-pltdoc="x">transform-vec3</a></span><span class="stt"> </span><span class="RktSym">m</span><span class="stt"> </span><span class="RktSym">v</span><span class="RktPn">)</span> erweitert <span class="RktSym">v</span> mit 1, multipliziert <span class="RktSym">m</span> mit <span class="RktSym">v</span> und dividiert das Ergebnis mit <span class="RktSym">w</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._multiply-matrix))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._multiply-matrix%29%29" class="RktValDef RktValLink" data-pltdoc="x">multiply-matrix</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">matrix4x4</span><span class="hspace"> </span><span class="RktSym">matrix4x4</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">matrix4x4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._multiply-matrix%29%29" class="RktValLink" data-pltdoc="x">multiply-matrix</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">b</span><span class="RktPn">)</span> gibt die Matrix <span class="RktSym">a</span>*<span class="RktSym">b</span> zurück.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._create-translation-matrix))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-translation-matrix%29%29" class="RktValDef RktValLink" data-pltdoc="x">create-translation-matrix</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">matrix4x4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-translation-matrix%29%29" class="RktValLink" data-pltdoc="x">create-translation-matrix</a></span><span class="stt"> </span><span class="RktSym">v</span><span class="RktPn">)</span> gibt die Translations-Matrix zurück.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._create-rotation-x-matrix))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-rotation-x-matrix%29%29" class="RktValDef RktValLink" data-pltdoc="x">create-rotation-x-matrix</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">matrix4x4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-rotation-x-matrix%29%29" class="RktValLink" data-pltdoc="x">create-rotation-x-matrix</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="RktPn">)</span> gibt eine Rotations-Matrix zurück die um die X-Achse mit dem Winkel <span class="RktSym">a</span> rotiert.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._create-rotation-y-matrix))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-rotation-y-matrix%29%29" class="RktValDef RktValLink" data-pltdoc="x">create-rotation-y-matrix</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">matrix4x4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-rotation-y-matrix%29%29" class="RktValLink" data-pltdoc="x">create-rotation-y-matrix</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="RktPn">)</span> gibt eine Rotations-Matrix zurück die um die Y-Achse mit dem Winkel <span class="RktSym">a</span> rotiert.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._create-rotation-z-matrix))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-rotation-z-matrix%29%29" class="RktValDef RktValLink" data-pltdoc="x">create-rotation-z-matrix</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">matrix4x4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-rotation-z-matrix%29%29" class="RktValLink" data-pltdoc="x">create-rotation-z-matrix</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="RktPn">)</span> gibt eine Rotations-Matrix zurück die um die Z-Achse mit dem Winkel <span class="RktSym">a</span> rotiert.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._create-lookat-matrix))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-lookat-matrix%29%29" class="RktValDef RktValLink" data-pltdoc="x">create-lookat-matrix</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">matrix4x4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-lookat-matrix%29%29" class="RktValLink" data-pltdoc="x">create-lookat-matrix</a></span><span class="stt"> </span><span class="RktSym">pos</span><span class="stt"> </span><span class="RktSym">lookat</span><span class="stt"> </span><span class="RktSym">up</span><span class="RktPn">)</span> gibt eine Kameramatrix. Ursprungspunkt ist <span class="RktSym">pos</span>, die Z-Achse zeigt auf <span class="RktSym">lookat</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._create-projection-matrix))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-projection-matrix%29%29" class="RktValDef RktValLink" data-pltdoc="x">create-projection-matrix</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">matrix4x4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-projection-matrix%29%29" class="RktValLink" data-pltdoc="x">create-projection-matrix</a></span><span class="stt"> </span><span class="RktSym">vertical-fov/2</span><span class="RktPn">)</span> erzeugt eine Projektions-Matrix. <span class="RktSym">vertical-fov</span>/2 gibt den vertikalen Winkel der Ansicht dividiert durch 2 an.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._create-viewport-matrix))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-viewport-matrix%29%29" class="RktValDef RktValLink" data-pltdoc="x">create-viewport-matrix</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">natural</span><span class="hspace"> </span><span class="RktSym">natural</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">matrix4x4</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-viewport-matrix%29%29" class="RktValLink" data-pltdoc="x">create-viewport-matrix</a></span><span class="stt"> </span><span class="RktSym">width</span><span class="stt"> </span><span class="RktSym">height</span><span class="RktPn">)</span> gibt einen Ausschnitt an.</div></p><h4 x-source-module="(lib "deinprogramm/scribblings/deinprogramm.scrbl")" x-source-pkg="deinprogramm" x-part-tag=""3dline"">10.5<tt> </tt><a name="(part._3dline)"></a>3d-Linien</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._line3d))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><span class="RktSymDef RktSym">line3d</span></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">signature</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Eine <a name="(tech._3d._linie)"></a><span style="font-style: italic">3d-Linie</span> <span class="RktSym">line3d</span> ist ein Record, der durch den Aufruf <span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-line3d%29%29" class="RktValLink" data-pltdoc="x">make-line3d</a></span> erstellt wird und eine farbige Linie zwischen zwei Punkten
im 3-dimensionalen Raum darstellt.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._make-line3d))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-line3d%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-line3d</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="hspace"> </span><span class="RktSym">color</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">line3d</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._make-line3d%29%29" class="RktValLink" data-pltdoc="x">make-line3d</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktSym">b</span><span class="stt"> </span><span class="RktSym">col</span><span class="RktPn">)</span> erstellt eine 3D-Linie zwischen Punkt <span class="RktSym">a</span> und Punkt <span class="RktSym">b</span> mit der Farbe <span class="RktSym">col</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._line3d-a))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._line3d-a%29%29" class="RktValDef RktValLink" data-pltdoc="x">line3d-a</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">line3d</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">extrahiert den Anfangspunkt einer 3D-Linie.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._line3d-b))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._line3d-b%29%29" class="RktValDef RktValLink" data-pltdoc="x">line3d-b</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">line3d</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">vec3</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">extrahiert den Endpunkt einer 3D-Linie.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._line3d-color))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._line3d-color%29%29" class="RktValDef RktValLink" data-pltdoc="x">line3d-color</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">line3d</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym">color</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">extrahiert die Farbe einer 3D-Linie.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._create-box))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-box%29%29" class="RktValDef RktValLink" data-pltdoc="x">create-box</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym">number</span><span class="hspace"> </span><span class="RktSym">color</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">list-of</span><span class="hspace"> </span><span class="RktSym">line3d</span><span class="RktPn">)</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._create-box%29%29" class="RktValLink" data-pltdoc="x">create-box</a></span><span class="stt"> </span><span class="RktSym">width</span><span class="stt"> </span><span class="RktSym">height</span><span class="stt"> </span><span class="RktSym">depth</span><span class="stt"> </span><span class="RktSym">color</span><span class="RktPn">)</span> erstellt eine Box am Punkt (0,0,0) in den angebenen Ausmaßen.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._teachpack/deinprogramm/line3d..rkt)._transform-primitive-list))"></a><span title="Provided from: teachpack/deinprogramm/line3d | Package: deinprogramm"><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._transform-primitive-list%29%29" class="RktValDef RktValLink" data-pltdoc="x">transform-primitive-list</a></span></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">list-of</span><span class="hspace"> </span><span class="RktSym">line3d</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">matrix4x4</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">list-of</span><span class="hspace"> </span><span class="RktSym">line3d</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara"><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._teachpack%2Fdeinprogramm%2Fline3d..rkt%29._transform-primitive-list%29%29" class="RktValLink" data-pltdoc="x">transform-primitive-list</a></span><span class="stt"> </span><span class="RktSym">scene</span><span class="stt"> </span><span class="RktSym">transformationr</span><span class="RktPn">)</span> wendet <span class="RktSym">transformation</span> auf alle Punkte der Linien in <span class="RktSym">scene</span> an und gibt
diese zurück.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="sound.html" title="backward to "9 Abspielen von Audio-Dateien: "sound.ss""" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Sprachebenen und Material zu Die Macht der Abstraktion"" data-pltdoc="x">up</a> <a href="DMdA__Sprachen_als_Libraries.html" title="forward to "11 DMdA: Sprachen als Libraries"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|