Matemática e Computação
 

Mensagens
Não te abandones em lugares onde a luz da tua harmonia não esteja presente.

 

 

Exemplo 156: Exemplo de Extrusion

Shape {
        appearance Appearance {
                material Material {
                       diffuseColor 1 1 0
                }
        }
        geometry Extrusion {
                crossSection [ 0 0, 0 1, 1 1, 1 0, 0 0 ]
                spine [0 0 0, 0 2 0 ]
                beginCap TRUE
                endCap TRUE
        }
}

Exemplo 157: Exemplo de Extrusion

Shape {
        appearance Appearance {
                material Material {
                       diffuseColor 1 1 0
                }
        }
        geometry Extrusion {
                crossSection [ 0 0, 0 1, 1 1, 1 0, 0 0 ]
                spine [0 -2 0, 0 -1 0, 0 0 0, 0 1 0, 0 2 0 ]
                orientation [ 0 1 0 0.3, 0 1 0 0.6, 0 1 0 0.9, 0 1 0 1.2, 0 1 0 1.5 ]
               
beginCap TRUE
                endCap TRUE
        }
}

Exemplo 158: Exemplo de Extrusion

Background {
        skyColor 0 0.3 0.5
}
Transform {
        children [
                PointLight {
                       location -5 -5 5
                       color 1 0 0
                       intensity 10
                }
                DEF Bloco Shape {
                       appearance Appearance {
                               material Material {
                                      diffuseColor 1 0 1
                               }
                       }
                        geometry Extrusion {
                                crossSection [ -1.5 1.5, -2 2, 2 2, 1.5 1.5, -1.5 1.5, ]
                                spine [ 0 0 -3,0 0 3]
                                endCap TRUE
                                beginCap TRUE
                        }
                }
        ]
}

Exemplo 159: Exemplo de Extrusion

Background {
        skyColor 0 0.3 0.5
}
Transform {
        children [
                PointLight {
                       location -5 -5 5
                       color 1 0 0
                       intensity 10
                }
                DEF Bloco Shape {
                       appearance Appearance {
                               material Material {
                                      diffuseColor 1 0 1
                               }
                       }
                        geometry Extrusion {
                                crossSection [ -1.5 1.5, -2 2, 2 2, 1.5 1.5, -1.5 1.5, ]
                                spine [ 0 0 -3,0 0 3]
                                endCap TRUE
                                beginCap TRUE
                        }
                }
                Transform {
                        rotation 0 0 1 1.57
                        children USE Bloco
                }
                Transform {
                        rotation 0 0 1 -1.57
                        children USE Bloco
                }
                Transform {
                        rotation 0 0 1 3.14
                        children USE Bloco
                }
       
]
}

Exemplo 160: Exemplo de Extrusion

# Construcao de um vaso.

Viewpoint {
      position 0.0 2.0 10.0
      description "Visao inicial"
}
#Desenha um vaso com o no de extrusao.
Group {
      children [
            Shape {
                  appearance Appearance {
                        material Material { diffuseColor 1.0 1.0 0.0 }
                  }
                  geometry Extrusion {
                        creaseAngle 1.57
                        endCap FALSE
                        solid FALSE
                        crossSection [
                              # Circulo
                              1.00 0.00, 0.92 -0.38,
                              0.71 -0.71, 0.38 -0.92,
                              0.00 -1.00, -0.38 -0.92,
                              -0.71 -0.71, -0.92 -0.38,
                              -1.00 -0.00, -0.92 0.38,
                              -0.71 0.71, -0.38 0.92,
                              0.00 1.00, 0.38 0.92,
                              0.71 0.71, 0.92 0.38,
                              1.00 0.00
                        ]
                        spine [
                              # Spine
                              0.0 0.0 0.0, 0.0 0.6 0.0,
                              0.0 1.0 0.0, 0.0 1.4 0.0,
                              0.0 1.8 0.0, 0.0 2.2 0.0,
                              0.0 2.6 0.0, 0.0 3.0 0.0,
                              0.0 3.4 0.0, 0.0 3.8 0.0,
                              0.0 4.2 0.0
                        ]
                        scale [
                              1.5 1.5, 1.95 1.95,
                              2.0 2.0, 1.95 1.95
                              1.8 1.8, 1.5 1.5
                              1.2 1.2, 1.05 1.05,
                              1.0 1.0, 1.05 1.05,
                              1.3 1.3,
                        ]
                  }
            }
      ]
}