Eine Kugel zeichnen |
```java
sphere(10);
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/RFcuPg88xLDUCaiJ-oc01.png) |
Kugel mit 60 Fragmente |
```java
$fn=60;
sphere(10);
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/jBmEKRCUgLJJtVNE-oc02.png) |
Kugel mit 3 Fragmente |
```java
$fn=3;
sphere(10);
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/z6La9ifp7ZHSeZQ0-oc03.png) |
Einen Zylinder zeichnen
|
```java
$fn=60;
cylinder (20,10);
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/KKapphijtcKWwqof-oc04.png) |
Einen Zylinder zeichnen |
```java
$fn=60;
cylinder (20,10,10);
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/zxP3iIc4N22KvzTY-oc05.png) |
Einen Würfel zeichnen |
```java
$fn=60;
cube (15);
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/3aJxSQ8eExB9U3GT-oc06.png) |
Einen Würfel zeichnen |
```java
$fn=60;
cube (15,center=true);
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/vc974cSVDBtTfNhp-oc07.png) |
Würfel und Kugel addieren |
```java
$fn=60;
cube (15, center=true);
sphere(10);
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/Y0BP1xNKDw3mWbpQ-oc08.png) |
Würfel und Kugel subtrahieren |
```java
$fn=60;
difference(){
cube (15, center=true);
sphere(10);
}
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/CNyPnRf781U4EIqo-oc09.png) |
Kugel, Würfel und Zylinder |
```java
$fn=60;
cube (15, center=true);
sphere(10);
cylinder (20,5,5,center=true);
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/nVz1TKaOBcaw2FD3-oc10.png) |
Kugel und Würfel addiert, der ist Zylinder subtrahiert |
|
```java
$fn=60;
difference(){
union(){
cube (15, center=true);
sphere(10);
}
cylinder (20,5,5,center=true);
}
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/SrSXQGiNlaLD372a-oc11.png) |
Dm als Durchmesser-Variable |
|
```java
$fn=60;
Dm =3;
difference(){
union(){
cube (15, center=true);
sphere(10);
}
cylinder (20,Dm,Dm,center=true);
}
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/YflfKi92Xt2U52pr-oc12.png) |
Eine zweite Kugel hinzugügen |
|
```java
$fn=60;
Dm =3;
difference(){
union(){
cube (15, center=true);
sphere(10);
}
cylinder (20,Dm,Dm,center=true);
}
translate ([0,0,17])
sphere(10);
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/vFyM74I3Nlf7awQZ-oc13.png) |
Die zweite Kugel subtrahieren |
|
```java
$fn=60;
Dm =3;
difference(){
union(){
cube (15, center=true);
sphere(10);
}
cylinder (20,Dm,Dm,center=true);
translate ([0,0,17])
sphere(10);
}
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/Vf0x8SKP9p9n8B5S-oc14.png) |
Mit rotate einen zweiten Durchbruch erzeugen |
|
```java
$fn=60;
Dm =3;
difference(){
union(){
cube (15, center=true);
sphere(10);
}
cylinder (20,Dm,Dm,center=true);
translate ([0,0,17])
sphere(10);
rotate([90, 0, 0])
cylinder (20,Dm,Dm,center=true);
}
```
| [](https://wiki.oberlab.de/uploads/images/gallery/2025-03/1432rdvgHE7piisR-oc15.png) |