MathCurvesSurfacesWallpaper GroupsGallerySoftwarePOV-Ray
ProgramingLinuxPerl PythonHTMLCSSJavaScriptPHPJavaEmacsUnicode ♥
Web Hosting by 1＆1

# POV-Ray Glassy Spheres and Transparency

Xah Lee,

This page show you how to use POV-Ray to make object transparent. If you don't understand it, please see Intro to POV-Ray.

## Transparency with Textures

POV-Ray allows various ways to simulate a object's surface. This feature is called textures. We will show some examples of textures here that are of mathematical interest, such as rendering translucent objects or reflective surfaces.

Here's a excerpt from POV-Ray documentation that makes it clear what texture in POV-Ray means:

The texture statement is an object modifier which describes what the surface of an object looks like, i.e. its material. Textures are combinations of pigments, normals, and finishes. Pigment is the color or pattern of colors inherent in the material. Normal is a method of simulating various patterns of bumps, dents, ripples or waves by modifying the surface normal vector. Finish describes the reflective properties of a material.

How shiny a object looks is emulated by the keyword “phong”. Its value can be set from 0 to 1. The higher the value, the more hard and smooth the surface appears. Its syntax is like this:

```texture{ pigment{ color Blue} finish {phong 0}}
```

To make a object transparent, use the “filter” or “transmit” keyword, like this:

```texture{ pigment{color Red filter 0.7 }}
texture{ pigment{color Red transmit 0.7 }}
```

Both “filter” and “transmite” lets light pass thru. Their difference is that filter will tint the light with the object's surface texture, while transmit will not. (look at their shadows)

## Glass Balls

To create glass-like effect, one must use the `interior{}` keyword, like this:

```interior{ior 1.5}
```

The ior means “index of refraction”.

The default ior value of 1.0 will give no refraction. The index of refraction for air is 1.0, water is 1.33, glass is 1.5 and diamond is 2.4.

2.6 Interior ＆ Media ＆ Photons