File:AnimationPraezessionMasseelementSeitenansicht.ogv
Original file (Ogg Theora video file, length 32 s, 960 × 540 pixels, 474 kbps, file size: 1.81 MB)
Captions
Contents
Summary
[edit]DescriptionAnimationPraezessionMasseelementSeitenansicht.ogv |
Deutsch: Animation zur Präzession |
Date | |
Source | Own work |
Author | Stündle |
Other versions | File:AnimationPraezessionMasseelement.ogv, File:Gyroskop und Praezession.png |
Licensing
[edit]This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
Source
[edit]- #baukasten/baukasten.pov
- #animation/praezession.pov
- #animation/praezession.ini
- #animation/animation.sh
baukasten/baukasten.pov
[edit]// povray 3.6
// Baukasten für Grafik zur Praezession
#include "math.inc"
#include "strings.inc"
#include "colors.inc"
/*
http://www.buckosoft.com/~dick/pov/colors.php
*/
//////////////////////////////////////////////////////////////////////////////
//
// Globale definitionen
//
//////////////////////////////////////////////////////////////////////////////
#declare Massepunkt_Bahnradius = 4.5;
#declare Massepunkt_Radius = 0.3;
//////////////////////////////////////////////////////////////////////////////
//
//
//
//////////////////////////////////////////////////////////////////////////////
#macro ZylinderStattVektor(Ort, Laenge, Farbe)
object {
cylinder {
<0, 0, 0>, Laenge, Vektor_Durchmesser
}
pigment {
color Farbe
}
translate Ort
}
#end // MeinZylinder
//////////////////////////////////////////////////////////////////////////////
//
// Sweep zeigt die Bahnkurve einer Punktmasse
// Startpunkt ist der Scheitelpunkt des Schwungrads
// 16 Interpolationspunkte pro Rotation
//
//////////////////////////////////////////////////////////////////////////////
#macro Massepunkt_Bahnkurve(Rotationen, Neigungswinkel)
#local lDivisor = 20;
#if(Rotationen * lDivisor >= 3)
/* #if(int(Punkte) < 3 )
#local lStop = 4;
#else
#local lStop = int(Punkte+1);
#end // if
#local lZaehler = 0;
*/
// #local lZaehler = Rotationen * 16;
#local lZaehler = 0;
#local lSubRotationen=0;
#while(lSubRotationen < Rotationen) // Rundungsscheiße
#local lZaehler = lZaehler + 1;
#local lSubRotationen = lSubRotationen + 1./lDivisor;
#end
#local lZaehler = lZaehler + 3; // einer extra
sphere_sweep {
cubic_spline
// (Zaehler+1),
lZaehler,
// #for (lZaehler, 0, lStop)
// <0, 0, lZaehler>, 0.5
// #end // for
#local lRotation_VektorPre = <0, cos(2*pi/lDivisor*-1), -1* sin(2*pi/lDivisor*-1)> * Massepunkt_Bahnradius;
#local lOrts_VektorPre = vaxis_rotate(lRotation_VektorPre, z, -1 * (Neigungswinkel/Rotationen)*1/lDivisor);
lOrts_VektorPre, Massepunkt_Radius/4
#local lSubRotationen = 0;
#while(lSubRotationen < Rotationen)
#local lRotation_Vektor = <0, cos(2*pi*lSubRotationen), -1* sin(2*pi*lSubRotationen)> * Massepunkt_Bahnradius;
#local lOrts_Vektor = vaxis_rotate(lRotation_Vektor, z, Neigungswinkel * (lSubRotationen/Rotationen));
lOrts_Vektor, Massepunkt_Radius/4
#local lSubRotationen = lSubRotationen + 1./lDivisor;
#end // while
#local lRotation_VektorEnde = <0, cos(2*pi*Rotationen), -1* sin(2*pi*Rotationen)> * Massepunkt_Bahnradius;
#local lOrts_VektorEnde = vaxis_rotate(lRotation_VektorEnde, z, Neigungswinkel);
lOrts_VektorEnde, Massepunkt_Radius/4
#local lRotation_VektorPost = <0, cos(2*pi*(Rotationen+lDivisor)), -1* sin(2*pi*(Rotationen+lDivisor))> * Massepunkt_Bahnradius;
#local lOrts_VektorPost = vaxis_rotate(lRotation_VektorPost, z, Neigungswinkel+(Neigungswinkel/Rotationen)*1/lDivisor);
lOrts_VektorPost, Massepunkt_Radius/4
}
// texture {
pigment{
gradient <0,0,1>
color_map{
// [-1.0 color White]
// [-0.7 color rgb<0.1,0.25,0.75>]
[0.0 color White transmit 0.7]
// [0.5 color White transmit 0.7]
// [0.5 color (0.3* White) transmit 0.7]
[1.0 color (0.3* White) transmit 0.7]
// [1.0 color White]
// [2.0 color rgb<0.1,0.25,0.75>]
// [1.0 color rgb<0.1,0.25,0.75>]
}
scale 2*(Massepunkt_Bahnradius+1)
translate z*-1*(Massepunkt_Bahnradius+1)
} // end pigment
// finish {ambient 1 diffuse 0}
// } // end of texture
/*
pigment {
color White transmit 0.7
}
*/
#else
#local lRotation_VektorPre = <0, cos(2*pi/lDivisor*-1), -1* sin(2*pi/lDivisor*-1)> * Massepunkt_Bahnradius;
#local lOrts_VektorPre = vaxis_rotate(lRotation_VektorPre, z, -1 * (Neigungswinkel/Rotationen)*1/lDivisor);
#local lRotation_Vektor1 = <0, cos(2*pi*Rotationen/2), -1* sin(2*pi*Rotationen/2)> * Massepunkt_Bahnradius;
#local lOrts_Vektor1 = vaxis_rotate(lRotation_Vektor1, z, Neigungswinkel * (1/2));
#local lRotation_Vektor2 = <0, cos(2*pi*Rotationen), -1* sin(2*pi*Rotationen)> * Massepunkt_Bahnradius;
#local lOrts_Vektor2 = vaxis_rotate(lRotation_Vektor2, z, Neigungswinkel);
#local lRotation_VektorPost = <0, cos(2*pi*(Rotationen+lDivisor)), -1* sin(2*pi*(Rotationen+lDivisor))> * Massepunkt_Bahnradius;
#local lOrts_VektorPost = vaxis_rotate(lRotation_VektorPost, z, Neigungswinkel+(Neigungswinkel/Rotationen)*1/lDivisor);
sphere_sweep {
cubic_spline
5,
lOrts_VektorPre, Massepunkt_Radius/4
<0, 1, 0> * Massepunkt_Bahnradius, Massepunkt_Radius/4
lOrts_Vektor1, Massepunkt_Radius/4
lOrts_Vektor2, Massepunkt_Radius/4
lOrts_VektorPost, Massepunkt_Radius/4
pigment {
color White transmit 0.7
}
}
#end // if
#end // Massepunkt_Bahnkurve
//////////////////////////////////////////////////////////////////////////////
//
// Segment eines Torus liegt in der xz-Ebene, Startpunkt ist die x-Achse
//
// http://www.f-lohmueller.de/pov_tut/all_shapes/shapes3_20d.htm
//
//////////////////////////////////////////////////////////////////////////////
#macro Segment_of_Torus ( R_major, R_minor, Segment_Angle)
#local D = 0.00001;
#if (Segment_Angle < 0)
#local Negativ_Flag = 1;
#local Segment_Angle = -Segment_Angle;
#else
#local Negativ_Flag = 0;
#end
#if (Segment_Angle > 360)
#local Segment_Angle = mod(Segment_Angle,360);
#end
intersection{
torus { R_major, R_minor }
#if (Segment_Angle > 180)
merge {
#end // use union!
box{ <-1,-1,0>,<1,1,1>
scale< R_major+R_minor+D,R_minor+D,R_major+R_minor+D>
} // end of box
box{ <-1,-1,-1>,<1,1,0>
scale< R_major+R_minor+D,R_minor+D,R_major+R_minor+D>
rotate< 0,-Segment_Angle,0 >
} // end of box
#if (Segment_Angle > 180)
}
#end // end of union, if union is used!
#if (Negativ_Flag = 0) rotate<0, Segment_Angle,0>
#end
} // end of intersection
#end // ----------------- end of macro Segment_of_Torus()
//////////////////////////////////////////////////////////////////////////////
//
// Makro zum Zeichnen eines Vektors als runde, pfeilartige Struktur samt
// Beschriftung.
//
//////////////////////////////////////////////////////////////////////////////
// Gobale Variablen
// * Vektor_Teilung
// * Kameraposition
// * Vektor_Staerke
// * Vektor_Schrift
#macro Vektor_Komplett(
Ort,
Vektor_Koordinaten,
Beschriftung
Index
Beschriftung_Seite
Farbe
// Farbe #1
// Farbe #2
)
#local Laenge = vlength(Vektor_Koordinaten);
#local Laenge_Cone = Laenge - (10.*Vektor_Durchmesser);
#local Vektor_Cone = Vektor_Koordinaten * (Laenge_Cone / Laenge);
#local Kamerarichtung_Text = Kameraposition - (Ort + Vektor_Cone); // Richtung der Kamera, vom Text aus (Näherungsweise)
#local Normalvektor_Text = -1.2 * Beschriftung_Seite * vnormalize(vcross(<Kamerarichtung_Text.x, 0, Kamerarichtung_Text.z>, Vektor_Koordinaten));
#local Ortsvektor_Text = Ort + Vektor_Cone + Normalvektor_Text;
// braucht es nicht // #local Kamerarichtung_Text = Kameraposition-(Ort+Vektor_Cone+Normalvektor_Text); // Richtung der Kamera, vom Text aus
//#local temp = vnormalize(vcross(Kameraposition, <0,1,0>)); // Senkrecht zur Kameraposition und in x-z-Ebene
//#local Elevation_Vektor = vangle(
// Überschlagswinkel
// Normalvektor aus Kamerarichtung und Vektor in Relation zu x-z-Ebene ergibt den Winkel zur y-Achse
// Winkel zwischen Normalvektor xy-Ebene und Vektor
#local lText_xy_Angle = VAngleD(x, <Kameraposition.x,0,Kameraposition.z>);
//#local lText_xz_Angle = VAngleD(vcross(x,z), Kameraposition);
//#local lText_yz_Angle = VAngleD(vcross(y,z), Kameraposition);
#local lText = text {
ttf Vektor_Schrift,
Beschriftung, 0.025, 0
}
#local lIndex = text {
ttf Vektor_Schrift,
Index, 0.025, 0
}
union {
#if (Laenge_Cone > 0.)
union { // Pfeil
cylinder {
<0, 0, 0>, Vektor_Cone, Vektor_Durchmesser
}
cone {
Vektor_Cone, 3.*Vektor_Durchmesser, Vektor_Koordinaten, 0.
}
translate Ort
}
#else
#if(Laenge > Vektor_Durchmesser)
cone {
<0,0,0>, 3.*Vektor_Durchmesser, Vektor_Koordinaten, 0.
translate Ort
}
#else
sphere {
<0,0,0>, Vektor_Durchmesser
translate Ort
}
#end
#end
union { // Text
// box { <0,0,0.1>, <2,1,1> }
object {
lText
translate x*-1* max_extent(lText).x/2 // hack -> center text
translate y*-1* max_extent(lText).y/2 // hack -> center text
}
#if ( strlen(Index) != 0 )
object {
lIndex
scale 0.67
translate y * max_extent(lText).y * (-0.5 + -0.2)
translate x * (max_extent(lText).x/2 + 0.1)
}
#end // if
//rotate <lText_xz_Angle, 0, 0>
rotate <0, lText_xy_Angle-90, 0>
translate Ortsvektor_Text
}
pigment {
color Farbe
}
}
#end // Vektor_Komplett
//////////////////////////////////////////////////////////////////////////////
//
// Makro zum Zeichnen eines Vektors als runde, pfeilartige Struktur samt
// Beschriftung.
//
//////////////////////////////////////////////////////////////////////////////
#macro Vektor(
Ort,
Vektor_Koordinaten,
Beschriftung,
Index,
Farbe
)
Vektor_Komplett(Ort, Vektor_Koordinaten, Beschriftung, Index, 1, Farbe)
#end
//////////////////////////////////////////////////////////////////////////////
//
// Makro zum Zeichnen eines Vektors als runde, pfeilartige Struktur samt
// Beschriftung.
//
//////////////////////////////////////////////////////////////////////////////
#macro Vektor_Invert(
Ort,
Vektor_Koordinaten,
Beschriftung,
Index,
Farbe
)
Vektor_Komplett(Ort, Vektor_Koordinaten, Beschriftung, Index, -1, Farbe)
#end
//////////////////////////////////////////////////////////////////////////////
//
// Schwungrad
//
//////////////////////////////////////////////////////////////////////////////
#macro Pfeilbogen (R_major, R_minor, Winkel, Winkel_Start)
merge {
Segment_of_Torus(R_major, R_minor, (lWinkel-5))
cone {
0, 0, z * lLaenge_Cone, 3.*Vektor_Durchmesser
translate x * R_major
rotate y * lWinkel
}
rotate x * 90
rotate z * Winkel_Start
}
#end // Pfeilbogen
//////////////////////////////////////////////////////////////////////////////
//
// Schwungrad
//
//////////////////////////////////////////////////////////////////////////////
//#local Pfeil = object { // Pfeil
// object {
// Segment_of_Torus(Winkel_Vektor_Radius, Vektor_Durchmesser, lWinkel)
// }
/* cone {
//rotate y * -10
translate x * Winkel_Vektor_Radius
// rotate y * lWinkel
}*/
//rotate y * 90
//translate x * 0.5
#declare schwungrad_ohne_pfeile = union { // Schwungrad
cylinder { // Achse
<-4, 0, 0>, <4, 0, 0>, 0.5
pigment { // grün
color 1.2 * Red transmit 0.5
}
}
merge { // Schwungrad mit Pfeil
difference {
cylinder { // Schwungrad
x * -0.5, x * 0.5, 5
}
cylinder { // Achse
x * -0.6, x * 0.6, 0.5
}
}
/*
rotate x * 90
rotate z * Winkel_Start
rotate x * Winkel_Neigung
rotate y * Winkel_Hochachse
*/
pigment { // grün
color Red transmit 0.5
}
}
}
//////////////////////////////////////////////////////////////////////////////
//
//
//
//////////////////////////////////////////////////////////////////////////////
#declare schwungrad = union { // Schwungrad
object {
schwungrad_ohne_pfeile
}
#local lWinkel = 40;
#local lLaenge_Cone = (5.*Vektor_Durchmesser); // kürzer als der gerade Vektor
merge {
Pfeilbogen(5.5, Vektor_Durchmesser, lWinkel, -20)
Pfeilbogen(5.5, Vektor_Durchmesser, lWinkel, (180-20))
rotate y * 180
rotate y * 90
// rotate x * (-90 + -45)
// translate x * 1
pigment {
color White
}
}
}
//////////////////////////////////////////////////////////////////////////////
//
// Schwungrad mit eingezeichnetem Massepunkt der die wirkenden Kräfte erklärt
//
//////////////////////////////////////////////////////////////////////////////
#macro Schwungrad_mit_Masse(Drehwinkel, Neigungswinkel)
union {
union {
object {
schwungrad_ohne_pfeile
}
union {
cylinder {
<0, 3.5, 0>, <0, 5.5, 0>, 0.05
}
cylinder {
<0, -3.5, 0>, <0, -5.5, 0>, 0.05
}
cylinder {
<0, 0, 3.5>, <0, 0, 5.5>, 0.05
}
cylinder {
<0, 0, -3.5>, <0, 0, -5.5>, 0.05
}
pigment {
color Gray50
}
}
rotate z*Neigungswinkel
}
#local lInnerePosition = vaxis_rotate(y*4.5,x, Drehwinkel);
#local lInnerePosition = vaxis_rotate(lInnerePosition, z, Neigungswinkel);
#local lOrthoInnerePosition = vaxis_rotate(x, z, Neigungswinkel);
union {
sphere {
lInnerePosition, Massepunkt_Radius
// rotate x*Drehwinkel
// rotate z*Neigungswinkel
}/*
sphere {
lInnerePosition*-1, 0.5
// rotate x*Drehwinkel
// rotate z*Neigungswinkel
}*/
// #local lInnerePositionVersatz = 0.5*Vektor_Durchmesser;
// #local lInnerePosition1 = lInnerePosition * (vlength(lInnerePosition)-lInnerePositionVersatz)/vlength(lInnerePosition);
// #local lInnerePosition2 = lInnerePosition * (vlength(lInnerePosition)+lInnerePositionVersatz)/vlength(lInnerePosition);
Vektor(lInnerePosition, lOrthoInnerePosition*-3.*sin(radians(Drehwinkel)), "F", "⊥", NewMidnightBlue)
// Vektor(lInnerePosition*-1, lOrthoInnerePosition*3.*sin(radians(Drehwinkel)), "-F", "⊥", NewMidnightBlue)
Vektor_Invert(1.00001*lInnerePosition, lOrthoInnerePosition*-3.*cos(radians(Drehwinkel)), "v", "⊥", ForestGreen)
// Vektor_Invert(1.00001*lInnerePosition*-1, lOrthoInnerePosition*3.*cos(radians(Drehwinkel)), "-v", "⊥", ForestGreen)
pigment {
color White transmit 0.8
}
}
}
#end // Schwungrad_mit_Masse
//////////////////////////////////////////////////////////////////////////////
//
// Schwungrad mit eingezeichnetem Massepunkt der die wirkenden Kräfte erklärt
//
//////////////////////////////////////////////////////////////////////////////
#macro Schwungrad_mit_Masse_v2(Drehwinkel, Neigungswinkel, RotationsRate, NeigungsRate)
union {
union {
object {
schwungrad_ohne_pfeile
}
union {
cylinder {
<0, 3.5, 0>, <0, 5.5, 0>, 0.05
}
cylinder {
<0, -3.5, 0>, <0, -5.5, 0>, 0.05
}
cylinder {
<0, 0, 3.5>, <0, 0, 5.5>, 0.05
}
cylinder {
<0, 0, -3.5>, <0, 0, -5.5>, 0.05
}
pigment {
color Gray50
}
}
rotate z*Neigungswinkel
}
#local lInnerePosition = vaxis_rotate(y*4.5,x, Drehwinkel);
#local lInnerePosition = vaxis_rotate(lInnerePosition, z, Neigungswinkel);
#local lTangential = vaxis_rotate(-1*z, x, Drehwinkel)* RotationsRate;
#local lTangentialGeneigt = vaxis_rotate(lTangential, z, Neigungswinkel);
#local lOrthogonalNormal = vaxis_rotate(x, z, Neigungswinkel);
#local lOrthogonal = lOrthogonalNormal *-1.*NeigungsRate*cos(radians(Drehwinkel));
#local lGesamt = (lTangentialGeneigt + lOrthogonal);
union {
sphere {
lInnerePosition, Massepunkt_Radius
// rotate x*Drehwinkel
// rotate z*Neigungswinkel
}/*
sphere {
lInnerePosition*-1, 0.5
// rotate x*Drehwinkel
// rotate z*Neigungswinkel
}*/
// #local lInnerePositionVersatz = 0.5*Vektor_Durchmesser;
// #local lInnerePosition1 = lInnerePosition * (vlength(lInnerePosition)-lInnerePositionVersatz)/vlength(lInnerePosition);
// #local lInnerePosition2 = lInnerePosition * (vlength(lInnerePosition)+lInnerePositionVersatz)/vlength(lInnerePosition);
Vektor(lInnerePosition, lOrthogonalNormal*-3.*sin(radians(Drehwinkel)), "F", "⊥", NewMidnightBlue)
// Vektor(lInnerePosition*-1, lOrthoInnerePosition*3.*sin(radians(Drehwinkel)), "-F", "⊥", NewMidnightBlue)
Vektor_Invert(1.00001*lInnerePosition, lGesamt, "v", "Σ", ForestGreen)
// Vektor_Invert(1.00001*lInnerePosition*-1, lOrthoInnerePosition*3.*cos(radians(Drehwinkel)), "-v", "⊥", ForestGreen)
pigment {
color White transmit 0.8
}
}
}
#end // Schwungrad_mit_Masse
/////////////////////////////////////////////////////////////////////////////////
//
// Schwungrad mit eingezeichneten Massepunkten der die wirkenden Kräfte erklärt
//
/////////////////////////////////////////////////////////////////////////////////
#macro Schwungrad_mit_Massen(Neigungswinkel)
union {
union {
object {
schwungrad
}
union {
cylinder {
<0, 3.5, 0>, <0, 5.5, 0>, 0.05
}
cylinder {
<0, -3.5, 0>, <0, -5.5, 0>, 0.05
}
cylinder {
<0, 0, 3.5>, <0, 0, 5.5>, 0.05
}
cylinder {
<0, 0, -3.5>, <0, 0, -5.5>, 0.05
}
pigment {
color Gray50
}
}
rotate z*Neigungswinkel
}
// union {
#local i = 0;
#while (i < 10)
#local i = i + 1;
#local Drehwinkel = i * 36;
#local lInnerePosition = vaxis_rotate(y*4.5,x, Drehwinkel);
#local lInnerePosition = vaxis_rotate(lInnerePosition, z, Neigungswinkel);
#local lOrthoInnerePosition = vaxis_rotate(x, z, Neigungswinkel);
union {
sphere { // Massepunkt
lInnerePosition, Massepunkt_Radius
}
// Kraftvektor
Vektor(lInnerePosition, lOrthoInnerePosition*-3.*sin(radians(Drehwinkel)), "", "", NewMidnightBlue)
// Geschwindigkeitsvektor ⊥
Vektor_Invert(1.00001*lInnerePosition, lOrthoInnerePosition*-3.*cos(radians(Drehwinkel)), "", "", ForestGreen)
pigment {
color White transmit 0.6
}
}
#end // for
}
#end // Schwungrad_mit_Massen
//////////////////////////////////////////////////////////////////////////////
//
// Makro zum Zeichnen eines Winkelvektors als runde, pfeilartige Struktur samt
// Beschriftung.
//
//////////////////////////////////////////////////////////////////////////////
// Gobale Variablen
// * Vektor_Teilung
// * Kameraposition
// * Vektor_Staerke
// * Vektor_Schrift
// * Winkel_Vektor_Radius
#macro Winkel_Vektor_Komplett(
Zentrum,
Winkel,
Winkel_Start,
Winkel_Hochachse,
Winkel_Neigung,
Beschriftung
Index
Beschriftung_Seite
Farbe
// Farbe #1
// Farbe #2
)
// TODO negative Winkel
#local lWinkel = Winkel - 10;
#local Laenge_Cone = (5.*Vektor_Durchmesser); // kürzer als der gerade Vektor
#local lPfeil = union { // Pfeil
object {
Segment_of_Torus(Winkel_Vektor_Radius, Vektor_Durchmesser, lWinkel)
}
cone {
0, 0, z * Laenge_Cone, 3.*Vektor_Durchmesser
//rotate y * -10
translate x * Winkel_Vektor_Radius
rotate y * Winkel
}
rotate x * 90
rotate z * Winkel_Start
rotate x * Winkel_Neigung
rotate y * Winkel_Hochachse
}
// Text
#local lText_Winkel = Winkel + Winkel_Start - 10.;
#local lText_Basis_Vektor = <cos(radians(lText_Winkel)),sin(radians(lText_Winkel)), 0> * Winkel_Vektor_Radius;
#local lText_Ortho_Basis_Vektor = vnormalize(vcross(lText_Basis_Vektor, z)); // Senkrecht zum Basisvektor und in der Kreisbogenebene
#local lText_Basis_Vektor = vaxis_rotate(lText_Basis_Vektor, x, Winkel_Neigung);
#local lText_Basis_Vektor = vaxis_rotate(lText_Basis_Vektor, y, Winkel_Hochachse);
#local lText_Ortho_Basis_Vektor = vaxis_rotate(lText_Ortho_Basis_Vektor, x, Winkel_Neigung);
#local lText_Ortho_Basis_Vektor = vaxis_rotate(lText_Ortho_Basis_Vektor, y, Winkel_Hochachse);
#local lText_Kamerarichtung = Kameraposition - (Zentrum + lText_Basis_Vektor); // Richtung der Kamera, vom Text aus (Näherungsweise)
#local lText_Kamerarichtung = vnormalize(lText_Kamerarichtung);
#local lText_Ortho_Vektor = vnormalize(vcross(<lText_Kamerarichtung.x, 0, lText_Kamerarichtung.z>, lText_Ortho_Basis_Vektor)) * -1.2; // TODO magic number
// #local lText_Ortho_Vektor = 0;
#local lText_Vektor = lText_Basis_Vektor + lText_Ortho_Vektor;
//#local Normalvektor_Text = -1.2 * Beschriftung_Seite * vnormalize(vcross(<Kamerarichtung_Text.x, 0, Kamerarichtung_Text.z>, Vektor_Koordinaten));
// Ziel
// maximaler Winkel zur xz-Ebene ausgehend vom Basisvektor
// Text zeigt in Kamerarichtung
// liegt in einer Ebene die Senkrecht auf auf der Kreisbogenebene steht
// #local lKreisbogen_Ortho_Vektor =
#local lText_xy_Angle = VAngleD(x, <Kameraposition.x,0,Kameraposition.z>);
#local lBeschriftung = text {
ttf Vektor_Schrift,
Beschriftung, 0.025, 0
}
#local lIndex = text {
ttf Vektor_Schrift,
Index, 0.025, 0
}
#local lText = union { // Text
#if ( strlen(Beschriftung) != 0 )
object {
lBeschriftung
translate x*-1* max_extent(lBeschriftung).x/2 // hack -> center text
translate y*-1* max_extent(lBeschriftung).y/2 // hack -> center text
}
#end // if
#if ( strlen(Index) != 0 )
object {
lIndex
scale 0.67
translate y * max_extent(lBeschriftung).y * (-0.5 + -0.2)
translate x * (max_extent(lBeschriftung).x/2 + 0.1)
}
#end // if
rotate y * (lText_xy_Angle-90)
translate lText_Vektor
}
union {
/* Debug
cylinder {
lText_Vektor
lText_Basis_Vektor
0.1
}
cylinder {
lText_Basis_Vektor
(lText_Basis_Vektor + lText_Ortho_Basis_Vektor)
0.1
}
cylinder {
lText_Basis_Vektor
(lText_Basis_Vektor + <lText_Kamerarichtung.x, 0, lText_Kamerarichtung.z>)
0.1
}
*/
object {
lPfeil
}
object {
lText
}
translate Zentrum
pigment {
color Farbe
}
}
#end // Winkel_Vektor_Komplett
//////////////////////////////////////////////////////////////////////////////
//
// Grid macro erzeugt eine gerasterte bodenebene
// http://www.f-lohmueller.de/pov_tut/calc/math_300e.htm
//
//////////////////////////////////////////////////////////////////////////////
#macro Grid_Plate(
RD1, Width1,//primary raster distance/width,
RD2, Width2,//secondary raster distance/width,
Base_Texture, // non = pigment { Clear }
Intensity, // Line gray intensity
Start_Box, End_Box, // vectors
) //------------------------------------------
//----------------------------------------------
box{ Start_Box,End_Box
texture{ Base_Texture }
#if (RD1 > 0 ) // raster big RD1, Width1,
texture { Grid_Lines(RD1,Width1,Intensity) }
texture { Grid_Lines(RD1,Width1,Intensity)
rotate<0,90,0>}
#end
#if (RD2 > 0 ) // raster small RD2, Width2,
texture { Grid_Lines(RD2,Width2,Intensity) }
texture { Grid_Lines(RD2,Width2,Intensity)
rotate<0,90,0>}
#end
} // end box -----------------------------------
#end // ------------------------------ end of macro
//------------------------------------- ////////////
//////////////////////////////////////////////////////////////////////////////
//
//
//////////////////////////////////////////////////////////////////////////////
#macro Raster(RScale, RLine)
pigment{
gradient x scale RScale
color_map{
[0.000 color rgb<1,1,1>*0.5]
[0+RLine color rgb<1,1,1>*0.5]
[0+RLine color rgbt<1,1,1,1>]
[1-RLine color rgbt<1,1,1,1>]
[1-RLine color rgb<1,1,1>*0.5]
[1.000 color rgb<1,1,1>*0.5]
}}
#end// of "Raster(RScale, RLine)"
//////////////////////////////////////////////////////////////////////////////
//
//
//////////////////////////////////////////////////////////////////////////////
#macro Grid_Lines (RScale, LineW, Intensity_)
pigment{ gradient x scale RScale
color_map{
[0.000 color rgbt<1,1,1,0>*Intensity_]
[0+LineW color rgbt<1,1,1,0>*Intensity_]
[0+LineW color rgbt<1,1,1,1>]
[1-LineW color rgbt<1,1,1,1>]
[1-LineW color rgbt<1,1,1,0>*Intensity_]
[1.000 color rgbt<1,1,1,0>*Intensity_]
} // end color_map
} // end pigment
#end// of Raster(RScale, HLine)-macro
//---------------<<<< Grid macro
//////////////////////////////////////////////////////////////////////////////
//
//
//////////////////////////////////////////////////////////////////////////////
#macro Grid(RasterScale, RasterHalfLine, Background_pigment)
plane{<0,1,0>,0
//layered textures!
texture{Background_pigment}
// 1st layer - base color
texture{
Raster( RasterScale, RasterHalfLine)
}
texture{
Raster( RasterScale, RasterHalfLine)
rotate<0,90,0>
}
}// end of plane
#end // end of "Grid(...)"-macro
animation/animation.sh
[edit]#!/bin/bash
start=`date`;
name="praezession"
# Clean up
rm -rf out;
rm -rf yuv;
rm -rf ogv;
rm *png;
# Setup
mkdir out;
mkdir yuv;
mkdir ogv;
# Rendering
povray $name.ini;
mv *png ./out;
povray=`date`;
# scheitert ersterer, kommt letzterer zum Zug.
png2yuv -j ./out/r_$name%02d.png -f 25 -I p -b 1 > ./yuv/out.yuv ||
png2yuv -j ./out/r_$name%03d.png -f 25 -I p -b 1 > ./yuv/out.yuv ||
png2yuv -j ./out/r_$name%04d.png -f 25 -I p -b 1 > ./yuv/out.yuv;
./ffmpeg2theora-0.29.linux32.bin ./yuv/out.yuv -F 25 -v 9 -o ./ogv/$name.ogv;
end=`date`;
echo Start: $start;
echo Povray: $povray;
echo End: $end;
# Die nicht, sonst keine back ground
# rm -rf out;
# rm -rf yuv;
firefox ./ogv/$name.ogv;
animation/praezession.pov
[edit]// povray 3.6
// Präzession eines Schwungrads
//
// Am Schwungrad lassen sich die Auswirkungen der Präzession aufzeigen. Ein Kippen
// der Rotationsachse vom Schwungrad ruft senkrecht zur Achse stehende Kräfte hervor.
// Zentrales Element bildet ein Schwungrad. Damit die vielen Vektoren erkennbar sind,
// wird das als transparentes Objekt abgebilet. Eine Änderung des Drehimpulses führt
// zu entsprechenden Kräften.
// Globale Definitionen
#declare Ansicht = 1;
// Achsen
// x -> links nach rechts
// y -> von unten nach oben
// z -> tiefe
// Kameraposition
#if (Ansicht = 1)
#declare Kameraposition = <10, 15, -28>;
#end
#if (Ansicht = 2)
#declare Kameraposition = <0, 0, -33>;
#end
// #declare Kameraposition = <0.1, 0.1, -28>;
#declare Vektor_Teilung = 1;
// * Vektor_Durchmesser
#declare Vektor_Durchmesser = 0.1;
// * Vektor_Schrift
#declare Vektor_Schrift = "Schrift/DejaVuSans.ttf"
#declare Winkel_Vektor_Radius = 2.5;
global_settings {
adc_bailout 0.00392157
assumed_gamma 1.5
noise_generator 2
charset utf8
}
light_source {
Kameraposition
rgb <1.5, 1.5, 1.5>
shadowless
}
camera {
//perspective
orthographic angle 45
location Kameraposition
sky <0, 1, 0>
direction <0, 0, 1>
right x*image_width/image_height
up <0, 1, 0>
look_at <0, 0, 0>
}
/*
camera { // X
perspective
location <45, 0, 0>
sky <0, 1, 0>
direction <0, 0, 1>
right <1, 0, 0>
up <0, 1, 0>
look_at <0, 5, 0>
}
camera { // Z
perspective
location <0, 0, -45>
sky <0, 1, 0>
direction <0, 0, 1>
right <1, 0, 0>
up <0, 1, 0>
look_at <0, 5, 0>
}
*/
#include "../baukasten/baukasten.pov"
#include "colors.inc"
// *******
// *
// * MAIN
// *
// *******
// Koordinaten-Achsen
// Schwungrad
// Drehimpuls
// Clock geht von 0. bis 1.
// Animation bis zur Neigung von 30° und 6 Umdrehungen
// BUG: Plättungseffekt???
#declare x_offset = 0; // -2;
#declare y_offset = -1;
#declare Rotationen = 4.;
#declare Neigung = 180.;
object { // Schwungrad
// schwungrad
Schwungrad_mit_Masse(-360. * Rotationen * clock, Neigung * clock)
// Schwungrad_mit_Masse_v2(-360. * Rotationen * clock, Neigung * clock, Rotationen, Neigung/360.)
// Massepunkt_Bahnkurve(Rotationen * clock, Neigung * clock)
// Schwungrad_mit_Masse(60, 90)
translate x * x_offset
translate y * y_offset
}
object { // Schwungrad
Massepunkt_Bahnkurve(Rotationen * clock, Neigung * clock)
// Schwungrad_mit_Masse(60, 90)
translate x * x_offset
translate y * y_offset
}
//
// Koordinatenachsen
//
object {
Vektor(<x_offset+6,y_offset,0>, <3,0,0>, "y", "", Gray50) // povray x-Achse
}
object {
ZylinderStattVektor(<x_offset-6,y_offset,0>, <-2,0,0>, Gray50) // povray x-Achse
}
object {
Vektor(<x_offset,y_offset+6,0>, <0,3,0>, "z", "", Gray50) // povray y-Achse
}
object {
ZylinderStattVektor(<x_offset,y_offset-6,0>, <0,-2,0>, Gray50) // povray y-Achse
}
#if (Ansicht = 2)
object {
Vektor_Invert(<x_offset,y_offset,-6>, <0,0,-3>, "x", "", Gray50) // povray z-Achse
}
object {
ZylinderStattVektor(<x_offset,y_offset,+6>, <0,0,2>, Gray50) // povray z-Achse
}
#end
//
// Hintergrund
//
sphere {
<0,0,0>,1 hollow
texture {
pigment{gradient <0,1,0>
color_map{
// [-1.0 color White]
// [-0.7 color rgb<0.1,0.25,0.75>]
[0 color White]
[1.0 color rgb<0.1,0.25,0.75>]
// [1.0 color White]
// [2.0 color rgb<0.1,0.25,0.75>]
// [1.0 color rgb<0.1,0.25,0.75>]
}
scale 2 translate y*-1
} // end pigment
finish {ambient 1 diffuse 0}
} // end of texture
// rotate x * 45
// rotate y * 45
scale 40
translate y * y_offset
} // end of sphere -----------------------
// EOF
animation/praezession.ini
[edit]; povray 3.6
; Die komplette Szene soll 30 Sekunden dauern und mit 25 FPS laufen.
; => 750
Input_File_Name=praezession.pov
Initial_Clock=0
Initial_Frame=0
;Standbild
;Final_Frame=0
;Preview
;Final_Clock=0.1333
;Final_Frame=100
;Mitte
;Initial_Clock=0.8
;Initial_Frame=600
;Final_Clock=0.8
;Final_Frame=600
;Final_Clock=0.53333
;Final_Frame=400
;Halb
;Initial_Clock=0.8
;Initial_Frame=600
Final_Clock=1.0
Final_Frame=800
;Final
;Final_Clock=1
;Final_Frame=750
;Subset_Start_Frame=500
;Subset_End_Frame=500
;Subset_Start_Frame=333
;Subset_End_Frame=400
;Final_Frame=60
;Final_Frame=300
;Final_Frame=750
;Final_Frame=1500
;+W320 +H200
;+W480 +H300
; SD
+W640 +H360
+W960 +H540
; HD
;+W1920 +H1080
;Output_File_Name=out/
Output_File_Name=r_praezession
Cyclic_Animation=on
Pause_when_Done=off
Antialias=on
Display=off
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 08:33, 8 February 2014 | 32 s, 960 × 540 (1.81 MB) | Stündle (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
Transcode status
Update transcode statusFile usage on other wikis
The following other wikis use this file:
- Usage on de.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Software used |
---|