It is anticipated that, other than for simple testing purposes you will always override the default values assigned to this array. This is a standard POV-Ray array and as such can be declared in a number of different ways as detailed in the POV-Ray documentation. Two common ways of declaring this variable are shown below. The first declares the array and assigns its values in a single statement.
The following example declares and dimensions the array identifier in the first statement, then assigns its 6 values in separate statements.
Numerous examples illustrating the use of this control variable are included in the quick start section of this documentation.
|
#include "StairCase.inc"
This example sets the stair width to 4 units.
#declare SCStairWidth = 4; StairCase() |
| |
|
#include "StairCase.inc"
This example sets the stair carpet width to 0.5 POV-Ray units. As shown in the image on the right, the stair width (as defined using the SCStairWidth variable) has defaulted to a value of 1, making the stairs 1 POV-Ray unit wide. The carpet does not therefore cover the whole stair width, leaving bare sections of riser and tread on either side of the carpet.
#declare SCStairCarpetWidth = 0.5; StairCase() |
| |
|
#include "StairCase.inc"
#declare SCHandRailHeight = 0.925; StairCase() | ||
|
#include "StairCase.inc"
Note that there is nothing stopping you specifying a very small baluster spacing that will cause the balusters to overlap.
#declare SCMaxBalusterSpacing = 0.008; StairCase() |
| |
|
#include "StairCase.inc"
The example illustrated in the image to the right specifies a very small riser height, creating a flight of stairs that is not particularly practical.#declare SCMaxRiserHeight = 0.10; StairCase() You can also specify the proportion of the riser that will be included in the staircase, to give an open effect. See SCRiserCoverage |
| |
|
#include "StairCase.inc"
This tells POV-Stairs to only use half height risers to support the treads, giving an open style of staircase. The rise from one tread to the next is controlled using the SCMaxRiserHeight control variable.
#declare SCRiserCoverage = 0.5; #declare SCStairCarpetOn = 0; StairCase() |
| |
|
#include "StairCase.inc"
This example suppresses the generation of landings as shown in the image on the right.
#declare SCLandingsOn = 0; StairCase() |
| |
|
#include "StairCase.inc"
This example suppresses the stair carpet as shown in the image on the right.
#declare SCStairCarpetOn = 0; StairCase() |
| |
|
#include "StairCase.inc"
This example suppresses the main banister as shown in the image on the right.#declare SCMainBanisterOn = 0; StairCase() Note that the banister rail referred to as the main banister rail is dependant upon the handedness of the stairs. In this example the setting for the SCStairHandedness variable defaults to '1' which indicates that the stairs are drawn to the right of the specified newel posts as one looks at the first flight of stairs from the starting point. |
| |
|
#include "StairCase.inc"
This example suppresses the paired banister as shown in the image on the right.#declare SCPairedBanisterOn = 0; StairCase() Note that the banister rail referred to as the paired banister rail is dependant upon the handedness of the stairs. In this example the setting for the SCStairHandedness variable defaults to '1' which indicates that the stairs are drawn to the right of the specified newel posts as one looks at the first flight of stairs from the starting point. Setting SCPairedBanisterOn to '0' therefore suppresses the banister rail to the right of those stairs. |
| |
|
This object represents a Newel Post. A pair of Newel Posts are used to support the ends of a length of handrail. The Newel Post is defined as being about 1 POV-Ray unit in height. The edge that will end up pointing towards the start of the flight of stairs needs to be initially defined pointing in the +z direction. The StairCase macro applies a texture based upon the setting of the SCNewelTexture variable. It then rotates and translates each Newel Post into position as necessary.
If not set, this object will default to the shape shown on the left which consists of a lathe cut shape. To override the default setting you can declare this object in your scene file before calling the StairCase macro. For example: |
|
|
#include "StairCase.inc"
#declare SCNewelPost = intersection { box {<-0.042,-1,-0.042><0.042,1.02,0.042>} plane {<0,1,1>,0 translate 1.05*y} plane {<0,1,1>,0 translate 1.05*y rotate 90*y} plane {<0,1,1>,0 translate 1.05*y rotate 180*y} plane {<0,1,1>,0 translate 1.05*y rotate 270*y} } StairCase() | ||
| This example defines a simple box shape for the post then bevels off the four top edges by intersecting the post with four appropriately positioned planes. |
![]() Box - Bevelled - Chamfer - Notched - Turned - Fluted |
A number of sample newel post shapes are included in the 'sample.inc' include file. The definitions are stored inside the SCNewelShape macro, so to use these shapes you need to include the file and run the macro, assigning the result to the 'SCNewelPost' variable before calling the StairCase macro.
The following example illustrates this:
#include "SCSamples.inc"
This example would generate a staircase using the 'Notched' newel post shape shown in the image to the left.
#include "StairCase.inc" #declare SCNewelPost = SCNewelShape ("Fluted") StairCase() |
|
This object represents a Baluster. A set of Balusters are used to support the handrail between pairs of Newel Posts. It is defined as being a little over 1 POV-Ray unit in height. The StairCase macro trims the top and bottom to match the setting of the SCHandRailHeight variable. The edge that will end up pointing towards the start of the flight of stairs is defined pointing towards the +z direction. The StairCase macro will apply a texture based upon the setting of the SCBalusterTexture variable. It then rotates and translates each Baluster into position as necessary.
If not set, this object will default to the shape shown on the left which consists of a lathe cut shape. To override the default setting you can declare this object in your scene file before calling the StairCase macro. For example: |
|
|
#include "StairCase.inc"
#declare SCBaluster = box {<-0.015,-0.03,-0.015><0.015,1,0.015>}; StairCase() | ||
| This gives a simple square section baluster as shown in the image to the right. |
![]() Fluted - Turned - Notched - Chamfer - Bevelled - Box |
A number of sample baluster shapes are included in the 'sample.inc' include file. The definitions are stored inside the SCBalusterShape macro, so to use these shapes you need to include the file and run the macro, assigning the result to the 'SCBaluster' variable before calling the StairCase macro.
The following example illustrates this:
#include "SCSamples.inc"
This example would generate a staircase using the 'Notched' baluster shape shown in the image to the left.
#include "StairCase.inc" #declare SCBaluster = SCBalusterShape ("Notched") StairCase() |
|
This object represents the hand rail and is defined as being of a 1 POV-Ray unit in length. The StairCase macro will scale this length as necessary to enable the hand rail to span the distance between two Newel Posts. The hand rail is defined starting at the origin and running out along the +z axis. The StairCase macro will scale this section, apply a unique texture based upon the setting of the SCRailTexture variable with a degree of randomness designed to give each hand rail a unique texture. It then rotates and translates each hand rail into position as necessary.
If not set, this object will default to the shape shown on the left. To override the default setting you can declare this object in your scene file before calling the StairCase macro. For example: |
|
|
#include "StairCase.inc"
#declare SCHandRail = cylinder {<0,0.015,0><0,0.015,1>,0.03 clipped_by{plane{-y,0}} scale y*0.6}; StairCase() | ||
| This gives a rounded handrail with a flat underside as shown in the image to the right. |
| This object represents the side edging of the stairs. The risers and the treads are connected into this component which supports the weight of a flight of stairs. If not set, this object will default to the shape shown on the left which consists of a simple rectangular piece topped with a standard shoerail. To override the default setting you can declare this object in your scene file before calling the StairCase macro. For example: |
|
|
#include "StairCase.inc"
#declare SCStringer = box {<-0.03,-0.14,-0.08><0.03,0.12,1.08>}; StairCase() | ||
| This uses a thicker stringer with no Shoerail, as shown in the image to the right. |
|
This object represents the tread and is defined as being of a 1 POV-Ray unit width. The StairCase macro will scale this width to match the setting of the SCStairWidth variable. The tread is defined at the origin with its top surface at a height of '0' units. The front edge of the tread points towards the +z direction. The back edge is typically defined as being at 1 POV-Ray back in the -z direction. The StairCase macro will trim this so that it stops when it meets the next riser. The StairCase macro will apply a unique texture based upon the setting of the SCTreadTexture variable with a degree of randomness designed to give each stair a unique texture. It then rotates and translates each tread into position as necessary.
If not set, this object will default to the shape shown on the left which consists of a rectangular piece fronted with a rounded edge. To override the default setting you can declare this object in your scene file before calling the StairCase macro. For example: |
|
|
#include "StairCase.inc"
#declare SCTread = box {<-0.5,-0.042,-1><0.5,0,0.15>}; #declare SCStairCarpetOn = 0; StairCase() | ||
| This replaces the rounded tread with a thick straight edged plank as shown in the image to the right. |
|
This object represents the riser that joins the back edge of one stair to the underside of the next. It is defined as being of a 1 POV-Ray unit in width and nearly 1 POV-Ray unit in height. It's top surface stops just short of y=0 to avoid any problems with coincident surfaces. The StairCase macro will scale the riser width to match the setting of the SCStairWidth variable and will scale the height to match the riser height which is calculated based upon the setting of the SCMaxRiserHeight variable. The riser is defined at the origin with its front surface pointing in the +z direction. The StairCase macro will apply a unique texture based upon the setting of the SCRiserTexture variable with a degree of randomness designed to give each stair a unique texture. It then rotates and translates each tread into position as necessary.
If not set, this object will default to the shape shown on the left which consists of a simple rectangular box. To override the default setting you can declare this object in your scene file before calling the StairCase macro. For example: |
|
|
#include "StairCase.inc"
#declare SCRiser = difference { box {<-0.5,-1,0.120><0.5,-0.001,0.128>} box {<-0.05,-0.05,0.119><0.05,0.05,0.129> rotate z*45 scale 2*y translate <-0.25,-0.55,0>} box {<-0.05,-0.05,0.119><0.05,0.05,0.129> rotate z*45 scale 2*y translate < 0 ,-0.55,0>} box {<-0.05,-0.05,0.119><0.05,0.05,0.129> rotate z*45 scale 2*y translate < 0.25,-0.55,0>} } #declare SCStairCarpetOn = 0; StairCase() | ||
| This example uses CSG to create a slightly more ornate riser as shown in the image to the right. |
|
This object represents a section of carpet running along the top of a tread and down over a riser. It is defined as being of a 1 POV-Ray unit in width and the StairCase macro scales this width to match the setting of the SCStairCarpetWidth variable. The front edge of the carpet segment points towards the +z direction. The back edge is typically defined as being at 1 POV-Ray back in the -z direction. The StairCase macro will trim this so that it stops when it meets the next riser. The StairCase macro will apply a texture based upon the setting of the SCStairCarpetTexture variable. It then rotates and translates each stair carpet section into position as necessary.
If not set, this object will default to the shape shown on the left which consists of a curled shape that wraps around the front of a stair. To override the default setting you can declare this object in your scene file before calling the StairCase macro. For example: |
|
|
#include "StairCase.inc"
#declare SCStairCarpet = box {<-0.4,0,-0.1><0.4,0.001,0.10>} StairCase() | ||
| This represents a rectangular section of carpet embedded into the tread as shown in the image to the right. |
|
#include "StairCase.inc"
#declare SCBalusterTexture = texture {pigment {color rgb <0,1,0>}}; StairCase() |
| |
|
#include "StairCase.inc"
#include "textures.inc" #declare SCStringerTexture = texture {Cherry_Wood translate <-1,-1,0> translate -y scale <0.1,0.015,0.1>} StairCase() |
| |
|
#include "StairCase.inc"
#declare SCRailTexture = texture {pigment {color rgb <1,0,1>}}; StairCase() |
| |
|
#include "StairCase.inc"
#include "textures.inc" #declare SCRiserTexture = texture {Sandalwood scale <0.1,0.005,0.1>} #declare SCStairCarpetOn=0; StairCase() |
| |
|
#include "StairCase.inc"
#declare SCStairCarpetTexture = texture {pigment {color rgb <1,1,1>}}; #declare SCStairCarpetWidth = 0.75; StairCase() |
| |
|
#include "StairCase.inc"
#declare SCStairCarpetColour = <0,1,0>; StairCase() |
| |