Difference between revisions of "User:TdG"
m |
m |
||
| Line 942: | Line 942: | ||
//!!!!!!!!!!!!!!!!!!!!!!!!! DOME !!!!!!!!!!!!!! | //!!!!!!!!!!!!!!!!!!!!!!!!! DOME !!!!!!!!!!!!!! | ||
| + | #macro Dome(Sz) | ||
| + | difference { | ||
| + | sphere { | ||
| + | 0,Sz | ||
| + | } | ||
| + | plane {y,0} | ||
| + | sphere {0,Sz-.15} | ||
| + | |||
| + | scale <1, (.25+rand(R1)), 1> | ||
| + | |||
| + | } | ||
| + | #end | ||
| + | |||
| + | //!!!!!!!!!!!!!!!!!!!!!!!!! BRACE !!!!!!!!!!!!!! | ||
| + | #macro Brace (d,DDog,BDog) //Random Seed, Controls thickness of brace, Controls angle of brace | ||
| + | difference { | ||
| + | lathe { | ||
| + | quadratic_spline | ||
| + | 7 | ||
| + | <1.75,-100>, | ||
| + | <1.75,-50>, | ||
| + | <1.75,-25>, | ||
| + | <1.75,-20>, | ||
| + | <1.75,-10>, | ||
| + | <1.75, 0>, | ||
| + | <1, 4> | ||
| + | //<0, 5> | ||
| + | sturm | ||
| + | } | ||
| + | //#local DDog = rand(RX)*.4; | ||
| + | sphere {0*y,1.5+DDog} | ||
| + | cylinder {0*y,-110*y,1.5+DDog} | ||
| + | plane {x,-1} | ||
| + | plane {x, 1 inverse} | ||
| + | plane {z,0} | ||
| + | translate -4*y | ||
| + | scale <.05,1,1> | ||
| + | scale <1,BDog,1> | ||
| + | texture {DHull} | ||
| + | } | ||
| + | #end | ||
| + | |||
| + | //!!!!!!!!!!!!!!!!!!!!!!!!! SUPPORT !!!!!!!!!!!!!! | ||
| + | #macro RSupport(d,DSa,H) | ||
| + | #local R1 = seed(d); | ||
| + | #local M = int(H+(rand(R1)*2)); | ||
| + | #local i = 0; | ||
| + | #local L = .15; | ||
| + | intersection { | ||
| + | union { | ||
| + | lathe { | ||
| + | cubic_spline | ||
| + | M+4, // number of points | ||
| + | <2+L,-2>, | ||
| + | <1+L,-1>, | ||
| + | #while (i<M) | ||
| + | <.2+sqrt(rand(R1))+L,i+rand(R1)>, | ||
| + | #local i = i+1; | ||
| + | #end | ||
| + | #local SphSz = .1+rand(R1)*2; | ||
| + | <SphSz+L, i+1>, | ||
| + | <0, i+1.5> | ||
| + | } | ||
| + | |||
| + | #if (DSa>1) | ||
| + | #local Null = rand(R1); //to make up for the extra random call in the Dome macro | ||
| + | #else | ||
| + | object{Dome(SphSz+L) translate (i+1)*y} | ||
| + | #end | ||
| + | } | ||
| + | |||
| + | plane {x, 1} | ||
| + | plane {x,-1 inverse} | ||
| + | plane {z,0} | ||
| + | scale <.1,1,1> | ||
| + | texture {DHull} | ||
| + | } | ||
| + | |||
| + | #end | ||
| + | |||
| + | //!!!!!!!!!!!!!!!!!!!!!!!!! BAY !!!!!!!!!!!!!! | ||
| + | // The Balcony | ||
| + | #macro Bay(d) | ||
| + | #local B = .1+.1*rand(RX); | ||
| + | #local A = 1+rand(RX); | ||
| + | union { | ||
| + | union { | ||
| + | torus { A, B } | ||
| + | cylinder {-B*y,B*y,A} | ||
| + | texture { | ||
| + | gradient y | ||
| + | texture_map { | ||
| + | [0.0 Bex1] | ||
| + | [0.1 Bex1] | ||
| + | [0.1 DHull] | ||
| + | [1.0 DHull] | ||
| + | } | ||
| + | warp {repeat y flip y} | ||
| + | } | ||
| + | scale <1,.25,1> | ||
| + | translate 2*x | ||
| + | } | ||
| + | union { | ||
| + | cylinder {0,2*x,A*.5} | ||
| + | sphere {2*x, A*.5} | ||
| + | scale <1,.25,1> | ||
| + | translate -.25*y | ||
| + | } | ||
| + | } | ||
| + | |||
| + | #end | ||
| + | |||
| + | //!!!!!!!!!!!!!!!!!!!!!!!!! PATH !!!!!!!!!!!!!! | ||
Revision as of 12:39, 2 May 2026
INTRODUCTION
This is a haphazard collection of stuff assembled over the last 30 years and written by a large number of POV-Ray users.
I am not the original writer/owner of the following files, only the collector. For all files the usual copyright terms of POV-Ray apply:
The files are licensed under the terms of the CC-LGPL.
Use and/or modification of the scenes is free, except for commercial purposes.
Commercial distribution is not allowed without written permission from their mentioned authors.
MORAY-GENERATED FILES AND AXES ORIENTATION
Some of the scene files below were generated by Moray V3.01 For Windows (c) 1991-1998 Lutz + Kretzschmar.
The scene axes orientation of these scene files are right-handed with the z-axis pointing upwards!
If you want to use them in a POV-Ray environment you need to convert them to the standard orientation (left-handed with the y-axis pointing upwards).
You can achieve this by applying the following transformation to each of the elements/objects in the files (courtesy: Txemi Jendrix):
transform {
scale <1, 1, -1>
rotate <90, 0, 0>
}
Usage example:
#include "MyIncludeFile.inc"
object {MyObject
texture {MyTexture}
transform {
scale <1, 1, -1>
rotate <90, 0, 0>
}
}
LIST OF TOPICS
- cloth
- constructions
- glass
- landscape
- nature
- wood
- stone
- sky
- water
TOPIC: SKY
topic: sky
title: Rainbow
year: 1998
author: Angelo Carlucci
description: A rainbow as seen through a raindrop-spattered window.
link: none available
comment 1: This scene file was originally generated for POV-Ray V3.0 by Moray V3.01 For Windows (c) 1991-1998 Lutz + Kretzschmar. Created for the "IRTC".
comment 2: See above for how to handle those files.
code snippets: To help interpret and use Moray-generated POV-Ray code, the original global_settings and camera codes have also been provided.
global_settings {
adc_bailout 0.003922
ambient_light <1.0,1.0,1.0>
assumed_gamma 1.9
hf_gray_16 off
irid_wavelength <0.247059,0.176471,0.137255>
max_intersections 64
max_trace_level 10
number_of_waves 10
radiosity {
brightness 3.3
count 100
//distance_maximum 0.0
error_bound 0.4
gray_threshold 0.5
low_error_factor 0.8
minimum_reuse 0.015
nearest_count 6
recursion_limit 1
}
}
camera {
location <-4.550, 6.800, 5.000>
direction <0.0, 0.0, 1.2659>
sky <0.0, 0.0, 1.0> // Use right handed-system!
up <0.0, 0.0, 1.0> // Where Z is up
right <1.33333, 0.0, 0.0>
look_at <-2.250, 3.600, 6.800>
// Focal blur settings
focal_point <-2.250, 3.600, 6.800> // Always Lookat
aperture 0.3
blur_samples 100
confidence 0.999
variance 0.0001
}
#declare Rainbow =
texture {
pigment {
wood
color_map {
[ 0.000000 rgbft <1.0, 1.0, 1.0, 0.0, 1.0> ]
[ 0.789894 rgbft <1.0, 1.0, 1.0, 0.0, 1.0> ]
[ 0.805851 rgbft <0.6, 0.0, 1.0, 0.0, 0.95> ]
[ 0.819149 rgbft <0.0, 0.0, 1.0, 0.0, 0.92> ]
[ 0.837766 rgbft <0.0, 1.0, 0.0, 0.0, 0.85> ]
[ 0.861702 rgbft <1.0, 1.0, 0.0, 0.0, 0.85> ]
[ 0.938830 rgbft <1.0, 0.0, 0.0, 0.0, 0.85> ]
[ 1.000000 rgbft <1.0, 1.0, 0.986667, 0.0, 1.0> ]
}
scale 2.0
}
finish {
ambient 0.7
diffuse 0.0
}
}
disc {
<0,0,0>, <0,0,1>, 1.0
texture {Rainbow}
no_shadow
scale 50.0
rotate <-45.0, -90.0, 0.0>
translate <31.1, 3.35, -10.8>
}
next blah blah blah...
TOPIC: CLOTH
topic: cloth
title: Crushed Velvet
year: 2000
author: Bob Hughes
description: An attempt at making a crushed velvet texture.
comment: Updated to POV-Ray 3.8, added warp turbulence, and changed to macro access by TdG (2023).
code: The following code should be saved in an include file, like crushedvelvet.inc
#macro Velvet(Vb,Vt,Vs,Vc)
// BEGIN VELVET CHOICES
// Color Brightness [ > 0 to 2 ? ]
#ifndef (Vb) #declare Vb = 1; #end
// Velvet Thickness [ 0 to 3 ? ]
#ifndef (Vt) #declare Vt = 1.5; #end
// Velvet Size [ 0 to 6 ? ]
#ifndef (Vs) #declare Vs = 1; #end
// Color Choice [ 1= black, 2= red, 3= green, 4= blue ]
#ifndef (Vc) #declare Vc = 2; #end
// END VELVET CHOICES
// Color Choice
#switch (Vc)
#case (1)
// Black
#declare Cv1 = <.05,.05,.05>;
#declare Cv2 = <.1,.1,.1>;
#declare Cv3 = <.075,.075,.075>;
#declare Cv4 = <.1,.1,.1>;
#declare Cv5 = <.05,.05,.05>;
#declare Cv6 = <.1,.1,.1>;
#declare Cfv1 = rgbf<.05,.05,.05,.4>;
#declare Cfv2 = rgbf<.1,.1,.1,.5>;
#declare Cfv1a = rgbf<.05,.05,.05,.1>;
#declare Cfv1b = rgbf<.1,.1,.1,.05>;
#declare Cfv2a = rgbf<.05,.05,.05,.1>;
#declare Cfv2b = rgbf<.1,.1,.1,.05>;
#break
#case (2)
// Red
#declare Cv1 = <.7,.1,.1>;
#declare Cv2 = <.75,.15,.2>;
#declare Cv3 = <.65,.15,.15>;
#declare Cv4 = <.65,.15,.25>;
#declare Cv5 = <.6,.1,.1>;
#declare Cv6 = <.65,.15,.15>;
#declare Cfv1 = rgbf<.5,.1,.1,.4>;
#declare Cfv2 = rgbf<.55,.1,.15,.5>;
#declare Cfv1a = rgbf<.6,.1,.1,.1>;
#declare Cfv1b = rgbf<.65,.15,.15,.05>;
#declare Cfv2a = rgbf<.6,.1,.1,.1>;
#declare Cfv2b = rgbf<.75,.15,.25,.05>;
#break
#case (3)
// Green
#declare Cv1 = <.1,.5,.2>;
#declare Cv2 = <.1,.65,.25>;
#declare Cv3 = <.1,.5,.3>;
#declare Cv4 = <.2,.6,.2>;
#declare Cv5 = <.1,.7,.1>;
#declare Cv6 = <.15,.65,.25>;
#declare Cfv1 = rgbf<.2,.5,.2,.4>;
#declare Cfv2 = rgbf<.3,.55,.25,.5>;
#declare Cfv1a = rgbf<.2,.6,.3,.1>;
#declare Cfv1b = rgbf<.2,.7,.3,.05>;
#declare Cfv2a = rgbf<.1,.6,.15,.1>;
#declare Cfv2b = rgbf<.15,.65,.2,.05>;
#break
#case (4)
// Blue
#declare Cv1 = <.1,.3,.7>;
#declare Cv2 = <.2,.4,.65>;
#declare Cv3 = <.12,.24,.58>;
#declare Cv4 = <.3,.5,.6>;
#declare Cv5 = <.2,.4,.7>;
#declare Cv6 = <.25,.35,.65>;
#declare Cfv1 = rgbf<.22,.34,.77,.4>;
#declare Cfv2 = rgbf<.35,.45,.75,.5>;
#declare Cfv1a = rgbf<.12,.24,.6,.1>;
#declare Cfv1b = rgbf<.2,.3,.7,.05>;
#declare Cfv2a = rgbf<.12,.24,.6,.1>;
#declare Cfv2b = rgbf<.2,.3,.7,.05>;
#break
#end
// BEGIN VELVET TEXTURE DEFINITION
#declare T1 =
texture {
pigment {
wrinkles frequency .666
color_map {
[0 color rgb Cv1*Vb]
[1 color rgb Cv2*Vb]
}
sine_wave
}
normal {
crackle 10
normal_map {
[0.1 wrinkles 8 triangle_wave scale <3,.5,1>*10 rotate <15,30,5>]
[0.3 crackle 8 scallop_wave scale <3,.5,1>*10 rotate <15,30,5>]
[0.9 leopard 8 triangle_wave scale <3,.5,1>*10 rotate <15,30,5>]
}
triangle_wave
scale <3,.5,1>*5
rotate <15,30,5>
}
finish {
diffuse .3
fresnel on
reflection {<.05,.075,.1> fresnel on} crand .013
brilliance -.25*Vt
}
}
#declare T2 =
texture {
pigment {
crackle frequency 2
color_map {
[0 color rgb Cv3*Vb]
[1 color rgb Cv4*Vb]
}
scallop_wave
}
normal {
agate 7.5 agate_turb .6
normal_map {
[0.1 wrinkles 8 triangle_wave scale <3,.5,1>*10 rotate <15,30,5>]
[0.3 crackle 8 scallop_wave scale <3,.5,1>*10 rotate <15,30,5>]
[0.9 leopard 8 triangle_wave scale <3,.5,1>*10 rotate <15,30,5>]
}
scallop_wave
scale <3,.5,1>*10
rotate <15,30,5>
}
finish {
diffuse .35
fresnel on
reflection {<.05,.075,.1> fresnel on} crand .013
brilliance -.3*Vt
}
}
#declare T3 =
texture {
pigment {
granite frequency .5
color_map {
[0 color rgb Cv5*Vb]
[1 color rgb Cv6*Vb]
}
triangle_wave
}
normal {
bozo 5
turbulence .9
normal_map {
[0.1 wrinkles 8 triangle_wave scale <3,.5,1>*10 rotate <15,30,5>]
[0.3 crackle 8 scallop_wave scale <3,.5,1>*10 rotate <15,30,5>]
[0.9 leopard 8 triangle_wave scale <3,.5,1>*10 rotate <15,30,5>]
}
sine_wave
scale <3,.5,1>*15
rotate <15,30,5>
}
finish {
diffuse .4
fresnel on
reflection {<.05,.075,.1> fresnel on} crand .013
brilliance -.35*Vt
}
}
#declare Tf =
texture {
pigment {
wrinkles frequency 2
color_map {
[0 color Cfv1*Vb]
[1 color Cfv2*Vb]
}
}
finish {
diffuse 1.25
fresnel on
reflection {<.05,.075,.1> fresnel on} crand .013
brilliance -.75*Vt
metallic .6
}
}
texture {
pigment {
wrinkles frequency 2
color_map {
[0 color Cfv1*Vb]
[1 color Cfv2*Vb]
}
}
finish {
diffuse .05
fresnel on
reflection {<.05,.075,.1>*.25 fresnel on} crand .013
brilliance .125*Vt
metallic .3
}
}
#declare P1 =
pigment {
granite
color_map {
[0 color Cfv1a*Vb]
[1 color Cfv1b*Vb]
}
}
#declare P2 =
pigment {
granite
color_map {
[0 color Cfv2a*Vb]
[1 color Cfv2b*Vb]
}
}
#declare Tp1 =
texture {
pigment {
gradient x turbulence .09 frequency .333
pigment_map {
[0 P1]
[1 P2]
}
scallop_wave
}
finish {
diffuse .5
fresnel on
reflection {<.05,.075,.1> fresnel on} crand .016
brilliance .125*Vt
}
}
#declare Tp2 =
texture {
pigment {
gradient y turbulence .09 frequency .333
pigment_map {
[0 P1]
[1 P2]
}
scallop_wave
}
finish {
diffuse .5
fresnel on
reflection {<.05,.075,.1> fresnel on} crand .016
brilliance .125*Vt
}
}
#declare Tp3 =
texture {
pigment {
gradient z turbulence .09 frequency .333
pigment_map {
[0 P1]
[1 P2]
}
scallop_wave
}
finish {
diffuse .5
fresnel on
reflection {<.05,.075,.1> fresnel on} crand .016
brilliance .125*Vt
}
}
// FINAL VELVET TEXTURE
#declare CVelvet =
texture {
average
texture_map {
[1.000 T1]
[0.750 T2]
[0.875 T3]
[0.705 Tf]
[0.900 Tp1]
[0.900 Tp2]
[0.900 Tp3]
}
warp {turbulence 2.5} //added by TdG (2023)
scale .05*Vs
}
#end //of Velvet macro
topic: cloth
title: Tartan
year: 2002 / macro version: 2014
author: Unknown (macro version: TdG)
description: A tartan cloth texture, based on the Moray scene McGregor.mdl.
link: none available
comment:
code:
#version 3.7;
#ifndef(Standalone) #declare Standalone = on; #end
global_settings {
assumed_gamma 1
}
#declare Col1 = <1.0, 0.0, 0.0>;//original: red
#declare Col2 = <1.0, 0.0, 0.0>;//original: red
#declare Col3 = <0.0, 0.0, 0.0>;//original: black
#declare Pig1 =
pigment {
gradient x
color_map {
[0.190 srgb Col3]
[0.190 srgb Col1]
[0.233 srgb Col1]
[0.233 srgb Col3]
[0.304 srgb Col3]
[0.304 srgb <1.0, 1.0, 1.0>]
[0.325 srgb <1.0, 1.0, 1.0>]
[0.325 srgb Col3]
[0.396 srgb Col3]
[0.396 srgb Col1]
[0.441 srgb Col1]
[0.441 srgb Col3]
[0.625 srgb Col3]
[0.625 srgb Col1]
}
}
#declare Pig2 =
pigment {
gradient x
color_map {
[0.190 srgb Col3]
[0.190 srgb Col2]
[0.233 srgb Col2]
[0.233 srgb Col3]
[0.304 srgb Col3]
[0.304 srgb <1.0, 1.0, 1.0>]
[0.325 srgb <1.0, 1.0, 1.0>]
[0.325 srgb Col3]
[0.396 srgb Col3]
[0.396 srgb Col2]
[0.441 srgb Col2]
[0.441 srgb Col3]
[0.625 srgb Col3]
[0.625 srgb Col2]
}
}
#declare Mat_McGregor =
material {
texture {
pigment_pattern {
gradient <1.0, 1.0, 0.0>
color_map {
[0.0 srgb <0.0, 0.0, 0.0>]
[0.5 srgb <0.0, 0.0, 0.0>]
[0.9 srgb <1.0, 1.0, 1.0>]
[1.0 srgb <1.0, 1.0, 1.0>]
}
scale 0.03
rotate 45.0*y
}
texture_map {
[0.0 pigment {Pig1}]
[1.0 pigment {Pig2} rotate -90.0*y]
}
}
}
#if (Standalone)
global_settings {
adc_bailout 0.003922
ambient_light <1.0,1.0,1.0>
assumed_gamma 1
hf_gray_16 off
irid_wavelength <0.247059,0.176471,0.137255>
max_intersections 64
max_trace_level 10
number_of_waves 10
noise_generator 2
charset ascii
}
background { color <0.000,0.000,0.000> }
camera { // Camera Camera01
location <-1, 1, -1>*3
sky y
up y
right x*image_width/image_height
angle 50
look_at <0, 0, 0>
}
//
// ******* L I G H T S *******
//
light_source {
<0.0, 0.0, 0.0>
color rgb <1.000, 1.000, 1.000>
translate <10, 10, -10>
}
plane {
y, 0
material {Mat_McGregor}
}
#end
next blah blah blah...
TOPIC: WOOD
topic: wood
title: Eureka Wood
year: 1997/1999
author: Charles Fusner
description: A dark, somewhat reddish brown wood with very tiny, delicate grain, augmented by a nearly subliminal 2nd layer consisting of faint black speckles elongated along the grain.
link: none available
comment:
code: The following code should be saved in an include file, like ewood.inc
#declare texEurekaWood =
texture {
pigment {
wood
color_map {
[ 0.00 color rgb <0.53, 0.23, 0.13> ]
[ 0.45 color rgb <0.53, 0.23, 0.13> ]
[ 0.55 color rgb <0.58, 0.28, 0.18> ]
[ 1.00 color rgb <0.58, 0.28, 0.18> ]
}
scallop_wave
scale .1
warp { turbulence < .04, .04, 0 > lambda 1.8 omega .375 }
}
finish {
specular .05 roughness 1.0
crand .1
}
}
texture {
pigment {
granite
color_map {
[ 0.00 rgbt<0.25, 0.15, 0.15, 0.25> ]
[ 0.05 rgbt<.58, .23, .13, 0.25> ]
[ 0.10 rgbt<.58, .23, .13, 1.0> ]
[ 1.00 rgbt<.58, .23, .13, 1.0> ]
}
frequency 6
scale <1,1,100>
}
finish {
specular .05 roughness 1.0
crand .1
}
}
next blah blah blah...
TOPIC: CONSTRUCTIONS
topic: constructions
title: Sci-FiGen
year: 2007
author: Kirk Andrews
description: Set of macros to generate random science-fiction-like buildings.
link: none available
comment 1: The following images are required:
comment 2:
A building is created using the Body(any seed number, desired height) macro.
Using the same number for both values will produce the same building every time. If you want the buildings to look different, be sure to use different numbers. In the example scene provided, this has been addressed.
code: The following code files are provided. First Sci-FiGenTex.inc
//name to use for this include file:
//Sci-FiGenTex.inc
#declare DWindow =
texture{
pigment {
color rgb <0.572549019607843,1,0.552941176470588> filter .1
}
finish{
specular .1
roughness 0.00286312
ambient rgb .2
diffuse 0.6
reflection{.5 metallic}
conserve_energy
}
}
#declare DHull =
texture{
pigment {color rgb .2 transmit 0}
//normal {bumps .2}
finish{
specular .1 metallic
roughness 0.286312
ambient rgb <0,0,0>
diffuse 0.7
reflection{.0 metallic}
conserve_energy
}
}
#declare Bex1 =
texture {
pigment { rgb <.7,.7,1> }
normal {bumps .1}
finish {
ambient .4
specular .5 metallic roughness .001
reflection .0 metallic conserve_energy
irid {0.25 thickness .5 turbulence .5}
}
}
#declare AmWindow =
texture {
bumps
//scale .25*y
texture_map {
[0.0 Bex1]
[0.7 Bex1]
[0.7 DHull]
[1.0 DHull]
}
//scale .1
}
#declare Mix1 =
texture {
gradient y
//scale .1*y
texture_map {
[0.0 DHull]
[0.9 DHull]
[0.9 AmWindow]
[1.0 AmWindow]
}
}
#declare Mix2 =
texture {
gradient y
//scale .1*y
texture_map {
[0.0 DHull]
[0.3 DHull]
[0.3 AmWindow]
[1.0 AmWindow]
}
}
#declare Mix =
texture {
bumps
scale .05
texture_map {
[0.0 Mix1]
[0.8 Mix1]
[0.8 Mix2]
[1.0 Mix2]
}
//scale <100,40,100>
}
//=====================================================================
#declare Tex1 =
texture {
pigment {rgb .3}
//normal {bumps .1 turbulence .3 scale .01}
finish {ambient 0}
}
#declare Tex2 =
texture { Mix
//pigment {rgb .2}
//finish {specular 1 metallic reflection .2 metallic}
}
#declare Tex3 =
texture { DHull
//pigment {rgb <.6,.6,1>}
}
#declare Tex4 =
texture {
pigment {rgb .2}
finish {specular .1 reflection .00 ambient 0}
}
#declare Test =
texture {
// pattern for use in texture/pigment/normal/density
// takes the color of an image file to calculate the pattern value
image_pattern {
jpeg "Deline05.jpg" // image file to read (iff/tga/gif/png/jpeg/tiff/sys)
//use_color // use pixel color gray scale (default)
//use_alpha // use alpha value
//use_index // use palette index
}
scale <1/3,3/1,1>
warp {repeat y flip y}
texture_map {
[0.0 Tex1]
[0.25 Tex3]
[0.75 Tex4]
[1.0 Tex2]
}
warp {cylindrical}
}
Second Sci-FiGen.inc:
//name to use for this include file:
//Sci-FiGen.inc
#include "colors.inc"
#include "Sci-FiGenTex.inc"
// sets the default texture that objects get when they have no texture specified
#default {
texture {
pigment {color rgb 1}
finish{
ambient 0.0
specular .0
diffuse 0.2
}
}
}
//###################################################################################################################
//########################################## Texture Generators #####################################################
//###################################################################################################################
#macro BfTex(d)
#local R2 = seed(d);
#declare Tex1 =
texture {
pigment {rgb .1+rand(R2)*.3}
//normal {bumps .1 turbulence .3 scale .01}
finish {ambient 0 diffuse .3+rand(R2)*.5 specular rand(R2)*.3 metallic}
}
#declare Tex4 =
texture {
pigment {rgb .1+rand(R2)*.3}
finish {specular rand(R2)*.3 metallic reflection .00 ambient 0 diffuse (.3+rand(R2)*.5)}
}
#end
#macro BTex(d,Rot)
#local R2 = seed(d);
//BfTex(d)
texture {
image_pattern {
#switch (int(rand(R2)*6))
#case (0) jpeg "Deline.jpg" #break
#case (1) jpeg "Deline02.jpg" #break
#case (2) jpeg "Deline03.jpg" #break
#case (3) jpeg "Deline04.jpg" #break
#case (4) jpeg "Deline05.jpg" #break
#case (5) jpeg "Deline.jpg" #break
#else jpeg "Deline.jpg"
#end
}
scale <1/Rot, 3, 1>
warp {repeat y flip y}
texture_map {
[0.0 Tex1]
[0.25 Tex3]
[0.75 Tex4]
[1.0 Tex2]
}
warp {cylindrical}
}
#end
#declare DomeTex =
texture {
pigment {rgb 1 transmit .9}
finish{
reflection .5
metallic
irid{.25 thickness .5}
}
}
//###################################################################################################################
//########################################## Geometry Generators ####################################################
//###################################################################################################################
//!!!!!!!!!!!!!!!!!!!!!!!!! DOME !!!!!!!!!!!!!!
#macro Dome(Sz)
difference {
sphere {
0,Sz
}
plane {y,0}
sphere {0,Sz-.15}
scale <1, (.25+rand(R1)), 1>
}
#end
//!!!!!!!!!!!!!!!!!!!!!!!!! BRACE !!!!!!!!!!!!!!
#macro Brace (d,DDog,BDog) //Random Seed, Controls thickness of brace, Controls angle of brace
difference {
lathe {
quadratic_spline
7
<1.75,-100>,
<1.75,-50>,
<1.75,-25>,
<1.75,-20>,
<1.75,-10>,
<1.75, 0>,
<1, 4>
//<0, 5>
sturm
}
//#local DDog = rand(RX)*.4;
sphere {0*y,1.5+DDog}
cylinder {0*y,-110*y,1.5+DDog}
plane {x,-1}
plane {x, 1 inverse}
plane {z,0}
translate -4*y
scale <.05,1,1>
scale <1,BDog,1>
texture {DHull}
}
#end
//!!!!!!!!!!!!!!!!!!!!!!!!! SUPPORT !!!!!!!!!!!!!!
#macro RSupport(d,DSa,H)
#local R1 = seed(d);
#local M = int(H+(rand(R1)*2));
#local i = 0;
#local L = .15;
intersection {
union {
lathe {
cubic_spline
M+4, // number of points
<2+L,-2>,
<1+L,-1>,
#while (i<M)
<.2+sqrt(rand(R1))+L,i+rand(R1)>,
#local i = i+1;
#end
#local SphSz = .1+rand(R1)*2;
<SphSz+L, i+1>,
<0, i+1.5>
}
#if (DSa>1)
#local Null = rand(R1); //to make up for the extra random call in the Dome macro
#else
object{Dome(SphSz+L) translate (i+1)*y}
#end
}
plane {x, 1}
plane {x,-1 inverse}
plane {z,0}
scale <.1,1,1>
texture {DHull}
}
#end
//!!!!!!!!!!!!!!!!!!!!!!!!! BAY !!!!!!!!!!!!!!
// The Balcony
#macro Bay(d)
#local B = .1+.1*rand(RX);
#local A = 1+rand(RX);
union {
union {
torus { A, B }
cylinder {-B*y,B*y,A}
texture {
gradient y
texture_map {
[0.0 Bex1]
[0.1 Bex1]
[0.1 DHull]
[1.0 DHull]
}
warp {repeat y flip y}
}
scale <1,.25,1>
translate 2*x
}
union {
cylinder {0,2*x,A*.5}
sphere {2*x, A*.5}
scale <1,.25,1>
translate -.25*y
}
}
#end
//!!!!!!!!!!!!!!!!!!!!!!!!! PATH !!!!!!!!!!!!!!
blah blah blah blah blah.......