Gesellschaftsspiel-Replikator/Connect V1: Unterschied zwischen den Versionen

Aus Stratum 0
Wechseln zu:Navigation, Suche
(Seite angelegt: Anlegespiel Connect)
 
K
Zeile 2: Zeile 2:
  
  
// Rivers, Roads and Rails / Contact
+
// "Rivers, Roads and Rails" / "Contact" / "Connect"
 
// 2014-01-23 V1
 
// 2014-01-23 V1
 
// by Stratum 0
 
// by Stratum 0

Version vom 23. Januar 2014, 12:08 Uhr



// "Rivers, Roads and Rails" / "Contact" / "Connect"
// 2014-01-23 V1
// by Stratum 0
// License: WTF

$fn=20;
Kante=100;
Hoehe=4;
Kerbe=2;
RadiusA=Kante/4;
RadiusB=Kante*2/4;
RadiusC=Kante*3/4;
Strichdicke=8;
Kachelnummer=5;

if (Kachelnummer==1) 
{
    difference()
    {
        CreateTile("white");
        translate ([Kante/2,Kante/2,0]) CreateArch(RadiusA,"red");
        translate ([Kante/2,Kante/2,0]) CreateArch(RadiusB,"black");
        translate ([Kante/2,Kante/2,0]) CreateArch(RadiusC,"blue");
    }
};


if (Kachelnummer==2) 
{
    difference()
    {
        CreateTile("white");
        translate ([-Kante/2,Kante/2,0]) CreateArch(RadiusA,"red");
        translate ([-Kante/2,Kante/2,0]) CreateArch(RadiusB,"black");
        translate ([-Kante/2,Kante/2,0]) CreateArch(RadiusC,"blue");
    }
};

if (Kachelnummer==3) 
{
    difference()
    {
        CreateTile("white");
        translate ([Kante/2,-Kante/2,0]) CreateArch(RadiusA,"red");
        translate ([Kante/2,-Kante/2,0]) CreateArch(RadiusB,"black");
        translate ([Kante/2,-Kante/2,0]) CreateArch(RadiusC,"blue");
    }
};


if (Kachelnummer==4) 
{
    difference()
    {
        CreateTile("white");
        translate ([-Kante/2,-Kante/2,0]) CreateArch(RadiusA,"red");
        translate ([-Kante/2,-Kante/2,0]) CreateArch(RadiusB,"black");
        translate ([-Kante/2,-Kante/2,0]) CreateArch(RadiusC,"blue");
    }
};


if (Kachelnummer==5) 
{
        translate ([-Kante/4,Kante/4,Hoehe-Kerbe]) CreateEnd(RadiusC,"blue");
    difference()
    {
        CreateTile("white");
        translate ([-Kante/2,-Kante/2,Hoehe-Kerbe]) CreateArch(RadiusA,"red");
        translate ([-Kante/2,-Kante/2,Hoehe-Kerbe]) CreateArch(RadiusB,"black");
       
    }
};




module CreateTile(myColor)
{
     // Basisdomino erstellen
    color(myColor)     cube([Kante, Kante, Hoehe], center=true);
}; // End Module


module CreateArch(myRadius, myColor)
{
    difference () // Innenkreis vom Außenkreis abziehen.
    {
      color (myColor) 
        cylinder(Hoehe, myRadius+Strichdicke, myRadius+Strichdicke, center=true, $fn=60);
        cylinder(Hoehe, myRadius-Strichdicke, myRadius-Strichdicke, center=true, $fn=60);
    }  
};

module CreateEnd(myLane, myColor)
{
    color(myColor)   cube([Kante/2,Strichdicke*2, Hoehe], center=true);
                    
};