理发店旋转灯的三维几何建模与动画
2018-12-20 17:45
本 GeoGebra 范例展示了理发店旋转灯(Barber's pole)的三维几何构造与动态效果。通过结合圆柱体(Cylinder)、笛卡尔曲线(CurveCartesian)和曲面(Surface)等命令,精确模拟了旋转灯经典的螺旋条纹结构。范例中内置了动画控制参数(如 anima 和 giro),允许用户直观观察条纹的连续旋转动态。该模型是立体几何、参数方程以及计算机图形学在实际生活物体建模中的生动应用。
<?xml version="1.0" encoding="utf-8"?>
<geogebra format="5.0" version="5.0.518.0" app="classic" platform="w" id="adabf5bb-adf6-4ffa-b9ed-b05fb56e1bd0" xsi:noNamespaceSchemaLocation="http://www.geogebra.org/ggb.xsd" xmlns="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<gui>
<window width="809" height="600" />
<perspectives>
<perspective id="tmp">
<panes>
<pane location="" divider="0.9975278121137207" orientation="1" />
</panes>
<views>
<view id="4097" visible="false" inframe="false" stylebar="true" location="1,1,1,1" size="400" window="1072,385,699,550" />
<view id="8" toolbar="1001 | 1002 | 1003 || 1005 | 1004 || 1006 | 1007 | 1010 || 1008 1009 || 66 68 || 6" visible="false" inframe="false" stylebar="false" location="1,3" size="300" window="100,100,600,400" />
<view id="1" visible="false" inframe="false" stylebar="true" location="1" size="358" window="100,100,600,400" />
<view id="4" toolbar="0 || 2020 , 2021 , 2022 , 66 || 2001 , 2003 , 2002 , 2004 , 2005 || 2040 , 2041 , 2042 , 2044 , 2043" visible="false" inframe="false" stylebar="true" location="1" size="448" window="100,100,600,400" />
<view id="2" visible="false" inframe="false" stylebar="true" location="3" size="317" window="100,100,250,400" />
<view id="16" visible="false" inframe="false" stylebar="false" location="1" size="150" window="50,50,500,500" />
<view id="32" visible="false" inframe="false" stylebar="true" location="1" size="150" window="50,50,500,500" />
<view id="64" toolbar="0" visible="false" inframe="false" stylebar="true" location="1" size="150" window="50,50,500,500" />
<view id="128" visible="false" inframe="false" stylebar="false" location="1" size="480" window="50,50,500,500" />
<view id="70" toolbar="0 || 2020 || 2021 || 2022" visible="false" inframe="false" stylebar="true" location="1" size="150" window="50,50,500,500" />
<view id="43" visible="false" inframe="false" stylebar="false" location="1" size="450" window="50,50,500,500" />
<view id="512" toolbar="0 | 1 501 5 19 , 67 | 2 15 45 18 , 7 37 | 514 3 9 , 13 44 , 47 | 16 | 551 550 11 , 20 22 21 23 , 55 56 57 , 12 | 69 | 510 511 , 512 513 | 533 531 , 534 532 , 522 523 , 537 536 , 535 | 521 520 | 36 , 38 49 560 | 571 30 29 570 31 33 | 17 | 540 40 41 42 , 27 28 35 , 6 , 502" visible="true" inframe="false" stylebar="true" location="3" size="807" window="100,100,600,400" />
</views>
<toolbar show="false" items="0 39 73 62 | 1 501 67 , 5 19 , 72 75 76 | 2 15 45 , 18 65 , 7 37 | 4 3 8 9 , 13 44 , 58 , 47 | 16 51 64 , 70 | 10 34 53 11 , 24 20 22 , 21 23 | 55 56 57 , 12 | 36 46 , 38 49 50 , 71 14 68 | 30 29 54 32 31 33 | 25 17 26 60 52 61 | 40 41 42 , 27 28 35 , 6" position="1" help="false" />
<input show="false" cmd="true" top="algebra" />
<dockBar show="false" east="false" />
</perspective>
</perspectives>
<labelingStyle val="0"/>
<font size="12"/>
</gui>
<euclidianView>
<viewNumber viewNo="1"/>
<size width="358" height="535"/>
<coordSystem xZero="215.00000000000009" yZero="315.00000000000006" scale="50.00000000000002" yscale="50.00000000000002"/>
<evSettings axes="false" grid="false" gridIsBold="false" pointCapturing="3" rightAngleStyle="1" checkboxSize="26" gridType="0"/>
<bgColor r="224" g="224" b="224"/>
<axesColor r="0" g="0" b="0"/>
<gridColor r="192" g="192" b="192"/>
<lineStyle axes="1" grid="0"/>
<axis id="0" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="1" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
</euclidianView>
<kernel>
<uses3D val="true"/>
<continuous val="false"/>
<usePathAndRegionParameters val="true"/>
<decimals val="2"/>
<angleUnit val="degree"/>
<algebraStyle val="0" spreadsheet="0"/>
<coordStyle val="0"/>
<startAnimation val="true"/>
</kernel>
<tableview min="-2" max="2" step="1"/>
<scripting blocked="false" disabled="false"/>
<euclidianView3D>
<coordSystem xZero="0" yZero="0" zZero="-5.855206338887933" scale="22.547239150373183" xAngle="20" zAngle="-60"/>
<evSettings axes="false" grid="false" gridIsBold="false" pointCapturing="3" rightAngleStyle="1" gridType="3"/>
<axis id="0" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="1" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<axis id="2" show="false" label="" unitLabel="" tickStyle="1" showNumbers="true"/>
<plate show="false"/>
<bgColor r="0" g="0" b="0"/>
<clipping use="false" show="false" size="2"/>
<projection type="0"/>
</euclidianView3D>
<construction title="" author="" date="">
<element type="angle" label="b">
<angleStyle val="3"/>
<value val="4.101523742186674"/>
<slider min="0°" max="360°" absoluteScreenLocation="true" width="180" x="82" y="67" fixed="true" horizontal="true" showAlgebra="true"/>
<show object="false" label="true" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<lineStyle thickness="10" type="0" typeHidden="2"/>
<arcSize val="30"/>
<animation step="1°" speed="5" type="1" playing="true"/>
</element>
<element type="angle" label="a">
<angleStyle val="3"/>
<value val="4.642575810304916"/>
<slider min="0°" max="360°" absoluteScreenLocation="true" width="180" x="126" y="86" fixed="true" horizontal="true" showAlgebra="true"/>
<show object="false" label="true" ev="4"/>
<objColor r="0" g="100" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<lineStyle thickness="10" type="0" typeHidden="2"/>
<arcSize val="30"/>
<animation step="1°" speed="5" type="1" playing="false"/>
</element>
<expression label="r" exp="2"/>
<element type="numeric" label="r">
<value val="2"/>
<symbolic val="true" />
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<element type="numeric" label="h">
<value val="11"/>
<symbolic val="true" />
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<slider min="0" max="20" absoluteScreenLocation="true" width="200" x="30" y="90" fixed="true" horizontal="true" showAlgebra="false"/>
<lineStyle thickness="2" type="0" typeHidden="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<element type="numeric" label="abajo">
<value val="-1"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<command name="CurveCartesian">
<input a0="(r * cos(a - b + ((t * 2) * π / h)))" a1="(r * sin(a - b + ((t * 2) * π / h)))" a2="t" a3="t" a4="0" a5="h"/>
<output a0="r1"/>
</command>
<element type="curvecartesian3d" label="r1">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<lineStyle thickness="1" type="0" typeHidden="0"/>
</element>
<command name="CurveCartesian">
<input a0="(r * cos(a - b + ((t * 2) * π / h)))" a1="(r * sin(a - b + ((t * 2) * π / h)))" a2="t + h / 4" a3="t" a4="((-h)) / 4" a5="h"/>
<output a0="r2"/>
</command>
<element type="curvecartesian3d" label="r2">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<lineStyle thickness="1" type="0" typeHidden="0"/>
</element>
<command name="Cylinder">
<input a0="(0, 0, 0)" a1="(0, 0, h)" a2="r - 0.02"/>
<output a0="a_3" a1="a_2" a2="a_3" a3="a_4"/>
</command>
<element type="quadriclimited" label="a_3">
<show object="false" label="false" ev="4"/>
<objColor r="255" g="255" b="255" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
</element>
<element type="conic3d" label="a_2">
<show object="false" label="false" ev="5"/>
<objColor r="255" g="255" b="255" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="false"/>
<lineStyle thickness="1" type="0" typeHidden="0"/>
<eigenvectors x0="1" y0="0" z0="1.0" x1="0" y1="1" z1="1.0"/>
<matrix A0="1" A1="1" A2="-3.9204" A3="0" A4="0" A5="0"/>
<eqnStyle style="parametric"/>
</element>
<element type="conic3d" label="a_3">
<show object="false" label="false" ev="4"/>
<objColor r="255" g="255" b="255" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<auxiliary val="false"/>
<lineStyle thickness="1" type="0" typeHidden="0"/>
<eigenvectors x0="1" y0="0" z0="1.0" x1="0" y1="1" z1="1.0"/>
<matrix A0="1" A1="1" A2="-3.9204" A3="0" A4="0" A5="0"/>
<eqnStyle style="parametric"/>
</element>
<element type="quadricpart" label="a_4">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="255" b="255" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="false"/>
<lineStyle thickness="5" type="0" typeHidden="1"/>
<eigenvectors x0="1" y0="0" z0="0" x1="0" y1="1" z1="0" x2="0" y2="0" z2="1"/>
<eqnStyle style="implicit"/>
</element>
<command name="CurveCartesian">
<input a0="(r * cos(a - b + ((t * 2) * π / h)))" a1="(r * sin(a - b + ((t * 2) * π / h)))" a2="t + h / 2" a3="t" a4="((-h)) / 2" a5="h / 2"/>
<output a0="b1"/>
</command>
<element type="curvecartesian3d" label="b1">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<lineStyle thickness="1" type="0" typeHidden="0"/>
</element>
<command name="CurveCartesian">
<input a0="(r * cos(a - b + ((t * 2) * π / h)))" a1="(r * sin(a - b + ((t * 2) * π / h)))" a2="t + (3 * h / 4)" a3="t" a4="(-3 * h / 4)" a5="h / 4"/>
<output a0="b2"/>
</command>
<element type="curvecartesian3d" label="b2">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<lineStyle thickness="1" type="0" typeHidden="0"/>
</element>
<command name="Surface">
<input a0="(r1(t) * k) + (r2(t) * (1 - k))" a1="t" a2="((-h)) / 4" a3="h" a4="k" a5="0" a6="1"/>
<output a0="a_1"/>
</command>
<element type="surfacecartesian3d" label="a_1">
<show object="true" label="false" ev="4"/>
<objColor r="255" g="0" b="0" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="0" type="0" typeHidden="0"/>
<levelOfDetailQuality val="true"/>
</element>
<command name="Surface">
<input a0="(b1(t) * k) + (b2(t) * (1 - k))" a1="t" a2="(-3 * h / 4)" a3="h / 2" a4="k" a5="0" a6="1"/>
<output a0="b_1"/>
</command>
<element type="surfacecartesian3d" label="b_1">
<show object="true" label="false" ev="4"/>
<objColor r="0" g="0" b="255" alpha="0.75"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="0" type="0" typeHidden="0"/>
<levelOfDetailQuality val="true"/>
</element>
<expression label="hs" exp="0.2"/>
<element type="numeric" label="hs">
<value val="0.2"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<expression label="rs" exp="r + 0.2" />
<element type="numeric" label="rs">
<value val="2.2"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
</element>
<command name="Cylinder">
<input a0="(0, 0, h)" a1="(0, 0, (5 * h / 4))" a2="rs"/>
<output a0="f" a1="f_2" a2="f_3" a3="f_4"/>
</command>
<element type="quadriclimited" label="f">
<show object="true" label="false" ev="4"/>
<objColor r="224" g="224" b="224" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
</element>
<element type="conic3d" label="f_2">
<show object="true" label="false" ev="4"/>
<condition showObject="oculta ≠ 0"/>
<objColor r="224" g="224" b="224" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="false"/>
<lineStyle thickness="5" type="0" typeHidden="0"/>
<eigenvectors x0="1" y0="0" z0="1.0" x1="0" y1="1" z1="1.0"/>
<matrix A0="1" A1="1" A2="-4.840000000000001" A3="0" A4="0" A5="0"/>
<eqnStyle style="parametric"/>
</element>
<element type="conic3d" label="f_3">
<show object="false" label="false" ev="4"/>
<objColor r="224" g="224" b="224" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="false"/>
<lineStyle thickness="1" type="0" typeHidden="0"/>
<eigenvectors x0="1" y0="0" z0="1.0" x1="0" y1="1" z1="1.0"/>
<matrix A0="1" A1="1" A2="-4.840000000000001" A3="0" A4="0" A5="0"/>
<eqnStyle style="parametric"/>
</element>
<element type="quadricpart" label="f_4">
<show object="true" label="false" ev="4"/>
<condition showObject="oculta ≠ 0"/>
<objColor r="224" g="224" b="224" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="false"/>
<lineStyle thickness="1" type="0" typeHidden="1"/>
<eigenvectors x0="1" y0="0" z0="0" x1="0" y1="1" z1="0" x2="0" y2="0" z2="1"/>
<eqnStyle style="implicit"/>
</element>
<command name="Cylinder">
<input a0="(0, 0, 0)" a1="(0, 0, ((-h)) / 4)" a2="rs"/>
<output a0="i" a1="i_2" a2="i_3" a3="i_4"/>
</command>
<element type="quadriclimited" label="i">
<show object="true" label="false" ev="4"/>
<objColor r="224" g="224" b="224" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
</element>
<element type="conic3d" label="i_2">
<show object="true" label="false" ev="5"/>
<condition showObject="oculta ≠ 0"/>
<objColor r="224" g="224" b="224" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="false"/>
<lineStyle thickness="5" type="0" typeHidden="0"/>
<eigenvectors x0="1" y0="0" z0="1.0" x1="0" y1="1" z1="1.0"/>
<matrix A0="1" A1="1" A2="-4.840000000000001" A3="0" A4="0" A5="0"/>
<eqnStyle style="parametric"/>
</element>
<element type="conic3d" label="i_3">
<show object="false" label="false" ev="4"/>
<objColor r="224" g="224" b="224" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="false"/>
<lineStyle thickness="1" type="0" typeHidden="0"/>
<eigenvectors x0="1" y0="0" z0="1.0" x1="0" y1="1" z1="1.0"/>
<matrix A0="1" A1="1" A2="-4.840000000000001" A3="0" A4="0" A5="0"/>
<eqnStyle style="parametric"/>
</element>
<element type="quadricpart" label="i_4">
<show object="true" label="false" ev="4"/>
<condition showObject="oculta ≠ 0"/>
<objColor r="224" g="224" b="224" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<auxiliary val="false"/>
<lineStyle thickness="1" type="0" typeHidden="1"/>
<eigenvectors x0="1" y0="0" z0="0" x1="0" y1="-1" z1="0" x2="0" y2="0" z2="-1"/>
<eqnStyle style="implicit"/>
</element>
<expression label="re" exp="3"/>
<element type="numeric" label="re">
<value val="3"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<command name="Surface">
<input a0="((re * cos(u)) * cos(v))" a1="((re * sin(u)) * cos(v))" a2="(re * sin(v)) + 0.5 + h + (0.8 * re)" a3="u" a4="0" a5="(2 * π)" a6="v" a7="((-π)) / 4" a8="π"/>
<output a0="c"/>
</command>
<element type="surfacecartesian3d" label="c">
<show object="true" label="false" ev="4"/>
<condition showObject="oculta ≠ 0"/>
<objColor r="224" g="224" b="224" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="0" type="0" typeHidden="0"/>
<levelOfDetailQuality val="true"/>
</element>
<command name="Surface">
<input a0="((re * cos(u)) * cos(v))" a1="((re * sin(u)) * cos(v))" a2="(re * sin(v)) - 0.5 - (0.8 * re)" a3="u" a4="0" a5="(2 * π)" a6="v" a7="(-π)" a8="π / 4"/>
<output a0="j"/>
</command>
<element type="surfacecartesian3d" label="j">
<show object="true" label="false" ev="4"/>
<condition showObject="oculta ≠ 0"/>
<objColor r="224" g="224" b="224" alpha="1"/>
<layer val="0"/>
<labelMode val="0"/>
<selectionAllowed val="false"/>
<lineStyle thickness="0" type="0" typeHidden="0"/>
<levelOfDetailQuality val="true"/>
</element>
<expression label="texto1" exp=""↶""/>
<element type="text" label="texto1">
<show object="true" label="false" ev="37"/>
<objColor r="255" g="255" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<fixed val="true"/>
<font serif="false" sizeM="2" size="12" style="1"/>
<absoluteScreenLocation x="73" y="70"/>
<ggbscript val="SetValue(anima,!anima)
StartAnimation(b, false)
StartAnimation(a, anima)"/>
</element>
<element type="boolean" label="anima">
<value val="true"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<checkbox fixed="true"/>
</element>
<element type="numeric" label="giro">
<value val="9"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0.10000000149011612"/>
<layer val="0"/>
<labelMode val="1"/>
<animation step="1" speed="1" type="0" playing="false"/>
</element>
<expression label="b_2" exp=""↷""/>
<element type="text" label="b_2">
<show object="true" label="false" ev="37"/>
<objColor r="255" g="255" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<fixed val="true"/>
<font serif="false" sizeM="2" size="12" style="1"/>
<absoluteScreenLocation x="121" y="73"/>
<ggbscript val="SetValue(anima,!anima)
StartAnimation(a, false)
StartAnimation(b, anima)"/>
</element>
<expression label="texto2" exp=""↕""/>
<element type="text" label="texto2">
<show object="true" label="false" ev="37"/>
<objColor r="255" g="255" b="255" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<fixed val="true"/>
<font serif="false" sizeM="2" size="12" style="1"/>
<absoluteScreenLocation x="669" y="74"/>
<ggbscript val="SetValue(oculta,!oculta)"/>
</element>
<element type="boolean" label="oculta">
<value val="true"/>
<show object="false" label="true"/>
<objColor r="0" g="0" b="0" alpha="0"/>
<layer val="0"/>
<labelMode val="0"/>
<checkbox fixed="true"/>
</element>
</construction>
</geogebra>