Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "colors.inc"
- #include "textures.inc"
- background { color rgb <0.3, 0.9, 1> }
- light_source{
- <200,300,-150>
- color White
- }
- camera{ //orthographic
- location < 200, 500, -150>
- up<0,1,0>
- right <1.78,0,0>
- look_at < 200, 100, -150>
- }
- plane{
- y,0
- pigment {color rgb <0.3, 1, 0.3>}
- }
- ///////////
- #macro mur (ilosc_cegiel, liczba_rzedow, glebokosc_zaprawy, odstep, cegla_dlugosc, cegla_wysokosc, cegla_szerokosc)
- intersection{
- union{
- #for (n, 0, liczba_rzedow-1, 1)
- #if (mod(n,2)=0) #local nieparzysty=0; #else #local nieparzysty=1; #end
- #if (nieparzysty=1) #local ilosc_cegiel=ilosc_cegiel+1; #end
- #for (i, 0, ilosc_cegiel-1, 1)
- box{
- <cegla_dlugosc*i,0,0>, <cegla_dlugosc*(i+1),cegla_wysokosc,cegla_szerokosc>
- translate <odstep*i,0,0>
- pigment {color rgb <0.59, 0.086, 0.043>}
- translate <nieparzysty*(-cegla_dlugosc/2), (cegla_wysokosc+odstep)*n, 0>
- }
- #end
- #if (nieparzysty=1) #local ilosc_cegiel=ilosc_cegiel-1; #end
- #end
- box{
- <0,0.1,0>,
- <ilosc_cegiel*(cegla_dlugosc+odstep)-odstep-glebokosc_zaprawy*2,
- liczba_rzedow*(cegla_wysokosc+odstep)-odstep-glebokosc_zaprawy-0.01, cegla_szerokosc-glebokosc_zaprawy*2>
- pigment {color rgb <0.9, 0.9, 0.9>}
- translate <glebokosc_zaprawy, 0, glebokosc_zaprawy>
- }
- }
- box { <0,-0.01,-0.01>, <ilosc_cegiel*cegla_dlugosc+(ilosc_cegiel-1)*odstep,
- liczba_rzedow*cegla_wysokosc+(liczba_rzedow-1)*odstep+0.01, cegla_szerokosc+0.01>
- pigment {color rgb <0.59, 0.086, 0.043>}
- }
- }
- #end
- object {
- mur(
- 18, //cegly w rzedzie
- 33, //liczba rzedow
- 1, //glebokosc zaprawy
- 1, //odstep miedzy ceglami
- 21, //dlugosc cegly
- 6.5, //wysokosc cegly
- 12, //szerokosc cegly
- )
- }
- object {mur(18, 33, 1, 1, 21, 6.5, 12)
- translate <0,0,-312>
- }
- object {mur(14, 33, 1, 1, 21, 6.5, 12)
- rotate <0,90,0>
- translate <383,0,0>
- }
- /**difference{
- union{
- **/object {mur(14, 33, 1, 1, 21, 6.5, 12)
- rotate <0,90,0>
- } /**
- box { //framuga okna
- <-5, 90, -55>,
- <14, 225, -245>
- pigment {color rgb <0.96, 0.96, 0.96>}
- }
- }
- union{
- box { //okno
- <-6, 98, -63>,
- <15, 217, -98>
- pigment {color rgb <0.96, 0.96, 0.96>}
- }
- box { //okno
- <-6, 98, -106>,
- <15, 217, -237>
- pigment {color rgb <0.96, 0.96, 0.96>}
- }
- }
- }
- union{
- box { //okno
- <5, 98, -62>,
- <8, 217, -99>
- }
- box { //okno
- <5, 98, -105>,
- <8, 217, -238>
- }
- pigment {color rgbt <0.18, 0.55, 1, 0.9>}
- finish {reflection 0.2}
- } **/
- box { //podłoga
- <1,0,5>,
- <398,2,-305>
- pigment{DMFWood1
- rotate <0, 90, 0>
- scale 20}
- finish{ phong 0.4
- reflection 0.12}
- }
- cylinder {
- <0,0,0>,
- <0,5,0>, 15
- translate <37, 2, -25>
- pigment {color rgb <0.7, 0.7, 0.7>}
- normal {onion 3}
- finish {reflection 0.2}
- }
- cylinder {
- <0,0,0>,
- <0,170,0>,2.5
- translate <37, 2, -25>
- pigment {color rgb <0.7, 0.7, 0.7>}
- normal {onion 3}
- finish {reflection 0.2}
- }
- difference{
- cone {
- <0,0,0>, 15
- <0,20,0> 5
- translate <37, 170, -25>
- pigment {color rgb <0.18, 0.95, 0.08>}
- normal {quilted}
- }
- cone {
- <0,0,0>, 15
- <0,20,0> 5
- translate <37, 165, -25>
- }
- }
- light_source{
- <37, 180, -25>
- color White
- }
- union{
- union{
- box {
- <0,0,0>,
- <10,80,-10>
- }
- box {
- <180,0,0>,
- <190,80,-10>
- }
- box {
- <0,0,-60>,
- <10,80,-70>
- }
- box {
- <180,0,-60>,
- <190,80,-70>
- }
- box {
- <0,0,0>,
- <10,10,-60>
- }
- box {
- <180,0,0>,
- <190,10,-70>
- }
- finish {phong 1}
- }
- box {
- <0,0,0>,
- <200,5,-90>
- pigment {DMFWood3
- scale 20}
- finish{phong 0.3}
- translate <-10,80,10>
- }
- translate <100, 2, -12>}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement