The shortest path to beautiful interactive 3D

Interactive 3D made easy

Tao3D lets you develop interactive 3D faster than ever before.

  • Make your biggest ideas easier to visualize.
  • Show animations that truly stand out.
  • Be understood, be remembered.
  • Code less and build great applications in no time.
Tao3D lets you share information more effectively.

Show more

With Tao3D, take advantage of new media such as 3D movies, 3D objects or 360° photos. Create visuals that engage your customers more than ever before. Let your message truly stand out to attract attention and explain everything more quickly and more convincingly.

Learn more

Interactive 3D enables a true two-way dialogue with your customers. Tao3D turns the most complex topics into child play, your biggest data sets into . Get instant feedback from your customers to learn more about them and with them. Unleash new opportunities.

Pay less

Spend less time coding to focus on the story you want to tell. Automate the most difficult tasks using Tao3D's high-level scripting language. Run on the platform you are familiar with, Windows, MacOSX or Linux. Deploy simultaneously on 2D and 3D screens. Enjoy free software.

Video tutorials to discover how easy it is

Superfast edit-test cycle

Tao3D offers an interactive development environment that lets you use your favorit text or image editors. Edit your code with Emacs, your data with LibreOffice, your pictures with Gimp. As soon as you save, Tao3D reloads your changes and lets you see the result.

A better way to teach

Complex structures, such as the DNA double-helix, are better explained if you show them in an interactive way. Interactivity and 3D facilitate understanding and help kids and students retain information. Better yet: Tao3D is easy enough to use that kids and students can create interactive models themselves.

Designs that you can play with

With Tao3D, your designs can be alive. If you spend time designing a clock, why not have it actually shows time? Tao3D is reactive, meaning it is a snap to integrate events such as time, mouse movements or keyboard actions. Now, your designs will no longer be static, they will be alive and functional.

Tell stories with 3D models

Tao3D can display 3D models stored in a number of common formats such as .obj, .3ds or .dae. You can now present your models in any way you want. Show how your new product works. Walk through a new building. The possibilities are endless.

Automate complex drawings

Tao3D can be used to automate the generation and animation of complex graphics such as cogwheels. When copy-paste is not powerful enough, Tao3D can be the graphic tool you need. Save the resulting pictures, with perfect transparent backgrounds if you need, or copy-Paste the result pictures from Tao3D.

Your math is alive!

Tao3D makes it very easy to create 2D and 3D interactive graphs. Integrating equations written in LaTeX is also quite easy. With Tao3D, mathematics become fun to show and tell. And since the graphs are actually computed, you can easily illustrate the impact of parameter changes.

Push graphic cards to the max

Tao3D includes support for GLSL shaders. Shaders can be used to create a variety of effects, including real-time ray-tracing. You can edit and test shaders in real-time, on complex scenes. Simply edit the shader code, save, and Tao3D reloads it in your animation.

Tiny bits of code for great results

Drawing

Tao3D includes a number of primitives for drawing 2D and 3D shapes. Attributes such as color apply to following shapes.

Coordinates are given in the order X, Y, W, H. X is horizontal, Y vertical, W is the width, H the height.

// White background (could be "transparent")
background_color "white"

// Draw a red ellipse
color "red"
ellipse 0, 0, 100, 200

// Draw a blue rectangle
color "blue"
rectangle 100, 0, 200, 100

Images

The image instruction displays a picture file. The image source can be a file or a URL.

// Draw an image without coloring it
color "white"
image "Cannes.jpg"

Picture formats such as PNG support transparent images (alpha channel).

// The color can be used to 'tint' an image
// You can also specify the image's position and scale
color "yellow"
image 0, 0, 50%, 25%, "Cannes.jpg"

Textures

A texture lets you place an image inside any shape or form. It is an attribute, like color.

// Draw an ellipse containing an image
texture "Cannes.jpg"
color "white"
ellipse 0, 0, 300, 200

You can build dynamic textures with frame_texture, control texture wrap-around with texture_wrap, and texture geometric transforms with texture_transform.

Dynamic textures are often a good way to optimize rendering, by pre-calculating a complex image once, and rendering a textured rectangle.

// Draw a star with colored circles inside
frame_texture 128, 128,
    color "red"
    circle -32, -32, 32
    color "blue", 70%
    circle 16, 16, 48
texture_transform
    scale 12
    rotate_z 45 * sin time
    translate -0.5, -0.5, 0
texture_wrap true, true
color "white"
rotate_z 20 * time
star 0, 0, 400, 400, 5, 40%

Coordinates

2D shapes take their arguments in the order X, Y, W, H. 3D shapes take a third coordinate for position and depth, so their arguments are X, Y, Z, W, H, D.

  • X is the horizontal coordinate
  • Y is the vertical coordinate
  • Z is the depth coordinate
  • W is the width of the shape
  • H is the height of the shape
  • D is the depth of the shape

Initially, coordinates (0,0,0) are at the center of the screen, and one unit corresponds to one pixel.

// Drawing 2D shapes, 0,0 is the center
color "red"
ellipse 0, 0, 30, 50
rectangle -50, 0, 50, 10
color "blue"
triangle 0, 50, 20, 50

color "white"
image 150, 0, 30% , 30% , "Cannes.jpg"
// Drawing 3D shapes
light 0
light_position 500, 700, 1000
color "red"
sphere 0, 0, 0, 300
color "blue"
rotate_y 50
cone 100, 100, 200, 50, 50, 100

Movies

The VLCAudioVideo module lets you play movies. Movies can be rotated, scaled or used as dynamic textures.

This means even 2D movies can be used in 3D animations.

// Playback a movie from YouTube
import VLCAudioVideo
rotate_y -45 * sin time
movie "https://www.youtube.com/watch?v=a-11dtG7aK4"

You can play as many movies as you need. If you have Tao installed, clicking on the button below will directly download the YouCube demo shown on the right. If you prefer, you can also read the source code first.

Download YouCube

Attributes

Instructions such as color or line_width define shape attributes. Attributes apply to all instructions that follow them and are cumulative.

// Color "red" applies to all subsequent shapes
color "red"
ellipse 0, 0, 30, 50
line_color "green"
line_width 4
rectangle -50, 0, 50, 10
color "blue"
triangle 0, 50, 20, 50

Colors

Colors are identified by name or HTML code (including CSS color names). You can also specify an optional opacity (alpha channel) as the last argument.

Alternatively, colors can be specified from numerical values in RGB, HSV or CYMK models. Hue is given in degrees between 0 and 360. All others are between 0 and 1 (or between 0% and 100%).

//  Using named colors
color "red"
rectangle 0, 0, 50, 100
color "blue"
rectangle 25, 0, 50, 75
color "#0000FF", 30% // HTML for "green"
rectangle 50, 0, 50, 50
// Using numerical colors
color 100%, 30%, 20%
rectangle 0, 0, 50, 100
color_hsv 200, 40%, 90%
rectangle 25, 0, 50, 75
color_cmyk 20%, 20%, 100%, 5%
rectangle 50, 0, 50, 50

Transforms

Global 3D geometric transformations change the coordinate system for the entire scene: translate, rotate, scale.

Like attributes, transforms apply to all items that follow them, and accumulate.

Variants with _x, _y or _z suffix apply to the given axis: scale_x, rotate_z.

The order of transforms matters. Doing a rotation followed by a translation is not the same as a translation followed by a rotation, for example.

// Showing translation and rotation
color "red"
rectangle 0, 0, 300, 200

translate 200, 100, -1000
rotate_y -55
color "blue"
rectangle 0, 0, 300, 200
                
// Translation, then rotation
rectangle 0, 0, 50, 100
translate 100, 0, 0
rotate_z 39
rectangle 0, 0, 50, 100
                
// Rotation, then translation
rectangle 0, 0, 50, 100
rotate_z 39
translate 100, 0, 0
rectangle 0, 0, 50, 100
                

Local changes

You can control the scope of attributes and transforms with locally. Changes made inside a locally stay there.

// The "blue" color and rotation stay within "locally"
color "red"
rectangle 0, 0, 50, 100
locally
    color "blue", 50%
    rotate_z 35
    rectangle 120, 0, 50, 100
rectangle 120, 0, 50, 100

Text

Text is drawn inside a text_box, using the text instruction.

There can be multiple instances of text and multiple attributes in a text box.

// Draw some text over a gray rectangle
color "darkgray"
rectangle 0, 0, 400, 150

color "white"
text_box 0, 0, 400, 150,
  text "Text is generally placed inside a text box. "
  text "It will fit in that box."
  font "Arial", 24, italic
  color "yellow"
  text "Attributes can be changed in the text box as well."

Justification

Tao3D offers a wealth of text layout features, including full or partial justification and centering, both horizontally and vertically.

Centering at 0% centers left, at 100% centers right, and at 50% in the middle. Other values are possible. This is especially useful for vertical centering, where 30% looks quite nice.

// Demonstrate justification in a text box
text_box 0, 0, 180, 300,
    vertical_align 30%
    align 50%
    text "Centered text (align 50%)"
    paragraph_break
    align 0%
    text "Left aligned text (align 0%)"
    paragraph_break
    align 100%
    text "Right aligned text (align 100%)"

    paragraph_break
    align 50% , 100%
    text "Fully justified with centered last-line "
    text "(align 50%, 100%)"

Shaders

Shaders are programs that execute directly on the graphic card. They can be used to create special effects, image filters, and more.

The example shader shown here creates an "old TV" look by alternating darker and brighter rows on the screen.

// A simple 'old TV' shader on a YouTube video
import VLCAudioVideo
movie_texture "https://www.youtube.com/watch?v=vcRX0Gw1aaw"
shader_program
  fragment_shader <<
    uniform float time;
    uniform sampler2D tex;
    void main() {
      vec2 tc = gl_TexCoord[0].xy;
      vec4 color = texture2D(tex, tc);
      color.a *= sin(tc.y*600.0 + 30.3*time)*0.2 + 0.9;
      gl_FragColor = color;
    }
  >>
shader_set time := page_time
color "white"
rounded_rectangle 0, 0, window_width, window_height, 40

3D objects

The ObjectLoader module makes it easy to display 3D models.

Normally, 3D objects are shown along with their textures and materials. But it is also possible to apply colors or shaders to the objects.

Audi S5 model from Resurs3D.

// Show a nice 3D object interactively
import ObjectLoader
background_color "black"
light 0
light_position 1000, 1000, 1000
translate 0, -200, 0
rotate_y 0.3 * mouse_x
rotate_x -95
object 0, 0, 0, 1000, 1000, 1000, "Resurs3D_Audi_S5.obj"
// Colorize a 3D object
import ObjectLoader
translate -50, -100, 0
rotate_y 0.3 * mouse_x
rotate_x -95
color "grey", 0.3
line_color "red", 1.0
line_width 0.5
colored_object 0,0,0, 800,800,800, "Resurs3D_Audi_S5.obj"

Image processing

You can turn Tao3D into a powerful image processing tool. One technique is to create pages for each image to process, capture a screen snapshot for each page, and then move to the next page automatically.

In this example, we colorize and emboss a number of Escher pictures fetched from the web, and then create a fuzzy border around them before capturing them as a PNG picture.

The screenshot can be taken with transparency (alpha channel). Note that if you use a transparent background, MacOSX may display garbage on the screen where the picture remains transparent. This is normal.

// Process all images in this list
ESCHER_IMAGES ->
   "another_world.jpg",
   "ascending_and_descending.jpg",
   "balcony.jpg",
   "belvedere.jpg",
   "bond_of_union.jpg",
   "bulldog.jpg",
   "circle_limit_I.jpg"

import Filters
window_size 800, 600
process_image with ESCHER_IMAGES
process_image Image ->
  page Image,
      background_color "transparent"
      texture "http://britton.disted.camosun.bc.ca/" &
              "escher/" & Image

      // Wait until texture has loaded
      if texture_width > 0 then
        emboss
        fuzzy_border 0.1
        color_hsv 20 * page_number, 1, 1
        rectangle texture_width, texture_height
        screenshot text_replace(Image,".jpg",".png"), true
        next_page

page "Done", false

Reactive

Tao3D is reactive: using time is enough to redraw the code as time passes. Using mouse_x is enough to redraw each time the mouse moves.

With on, you can define more traditional "callbacks" for other events.

// The color automatically changes with time
color_hsv 20 * time, 40%, 80%

// The ellipse automatically follows the mouse
ellipse mouse_x, mouse_y, 100, 200

// Change camera position when we hit keys
on "key:a", { camera_position 2000, 200, 3000 }
on "key:p", { camera_position -2000, -1200, 3000 }
on "key:r", { camera_position 0, 0, 3000 }

Functions

You declare variables or functions with the -> operator (which reads as transforms into). You transform the code on the left of -> into the code on the right.

Tao3D is functional and homoiconic. Code is data. Functions are defined like any other variable. Passing code as function arguments is so easy you will not even notice you are doing it.


// Declare variables foo and bar
foo -> 0
bar -> 10

// Declare function bar taking one argument
// (note that we overload 'bar')
bar N ->
    // Here, locally is a function that takes
    // code as an argument. Did you notice?
    locally
        color_hsv 20 * N, 90%, 70%, 40%
        rotate_z 17 * N
        ellipse 0, 0, 400, 200

// Call 'bar N' for all values between foo and bar
background_color "white"
for I in foo..bar loop
    bar I

Custom notations

Tao3D is based on concept programming, and uses simple notations that are easy to read and learn.

You can also define your own notations, using the same -> operator as for functions. It's like operator overloading on steroids.

This mechanism is actually used to implement practically everything in Tao3D, including control structures such as if-then-else or for loops.


// A custom notation to repeat a shape
[A..B] Body ->
    for I in A..B loop
        locally
            color_hsv 20 * I, 90%, 70%, 40%
            rotate_z 17 * I
            Body

// Tao3D can use indentation-based blocks
[1..5]
    ellipse 100, 0, 140, 30
    translate_x -180
    font "Arial", 40
    text "Hello"

// Or {} blocks if you prefer...
[3..20] { rectangle 50, 20, 30, 25 }

Imports & themes

Tao3D includes a complete system for modules.

Modules can be written in C++ and do complicated things like using VLC to decode videos. But most often, they are written in the Tao3D language. They can implement animated themes.


import SeasonsGreetingsTheme

theme "SeasonsGreetings"
main_title_slide "The main title slide",
    title "Seasons Greetings theme"
    subtitle "A theme for the holidays"

section_slide "A section slide",
    title "Section title"
    subtitle "Section subtitle"

slide "Bullet points",
    * "Bullet points"
    ** "More bullet points"
    *** "Deeper"

Contributing to Tao3D

Source code repositories

The Tao3D source code can be found at the following locations:

Prerequisites

The Tao3D software can be built on Windows, MacOSX and Linux. To build Tao, you will need:

  • A C++ compiler (Tested with g++ and clang)
  • OpenGL at least version 2.1, and related development files.
  • Qt version 4.8 or above.
    Not all versions of Qt are regularly tested.
    This commit may have temporarily broken 4.8-based builds.
    On Linux, you may have to download Qt5 if your distribution (e.g. Ubuntu) lacks the Qt5 help module.
  • LLVM version 2.9.
    While some serious effort was spent compiling with other versions, your mileage may vary.
  • Git
  • NodeJS
  • GLC-Lib
  • VLC
    The configuration script may complain that VLC was not patched, but the VLC patch is only useful for auto-stereoscopic displays, which are only supported in the commercial edition of Tao3D.

On Linux systems using apt-get, e.g. Ubuntu, you should be able to get the required dependencies with the following command:

apt-get install cpp  git  freeglut3 freeglut3-dev  nodejs  libglc2 glclib-dev  python-pycryptopp  libqt4-core libqt4-dev libqt4-gui qt4-dev-tools  llvm-2.9 llvm-2.9-tools llvm-dev llvm-runtime llvm-2.9-doc  clang  festival festival-dev  doxygen  vlc libvlc-dev

The software also downloads, uses or includes a few extra packages, including:

Many thanks to all the authors who indirectly made Tao possible

Build instructions

git clone git://git.code.sf.net/p/tao3d/code tao3d-code
cd tao-3D
git submodule update --init --recursive
./configure
make install