POV-Ray : Newsgroups : povray.unofficial.patches : problem(s) with tutorial file MegaPOV 1.1 Server Time
16 May 2024 00:53:58 EDT (-0400)
  problem(s) with tutorial file MegaPOV 1.1 (Message 1 to 3 of 3)  
From: Eli
Subject: problem(s) with tutorial file MegaPOV 1.1
Date: 14 Oct 2004 12:53:37
Message: <416eaf11@news.povray.org>
The scene below gives me a "Expected 'object', undeclared identifier 'Obj1' 
found instead" at line 118.
I suspect it has to do with changes in MechSim_Show_Patch (mechsim.inc) 
since MegPOV v1.10.....



// Persistence of Vision Ray Tracer Scene Description File
// File: tutorial08.pov
// Desc: mechanics simulation tutorial scene 8
// Date: October 2002
// Auth: Christoph Hormann
// Requirements: IsoCSG library: http://www.tu-bs.de/~y0013390/pov/ic/
//
//
// Render instructions:
// --------------------
//
// first render as still to generate simulation data:
//
// -w320 -h240
//
// then render as animation:
//
// -w320 -h240 +a0.3 -j +kff70

#version unofficial megapov 1.0;

#include "mechsim.inc"
#include "iso_csg.inc"

#declare fn_Env=
IC_Merge3(
  IC_Plane(z, 0),
  IC_Cylinder(-z, z*1.5, 0.3),
  IC_Sphere(z*1.5, 0.6)
)

#declare Trans1 =
  transform {
    translate -25*<0.055, 0.055, 0>
    translate 2.2*z
  }

global_settings {
  assumed_gamma 1.0

  mechsim {
    gravity -4.5*z
    method 4

    environment {
      function { fn_Env(x, y, z) }
      stiffness 60000
      method 1
    }

    #if (clock_on)
      step_count 800
      time_step (1/30)/4000

      topology {
        load_file "tut08.dat"
        save_file "tut08.dat"
      }
    #else
      step_count 0

      topology {
        MechSim_Generate_Patch_Std(<0, 0, 0>, 0.03, 8000, 10000, 0, true, 
<0.055, 0.055>, <50, 50>, Trans1, 2)
        save_file "tut08.dat"
      }
    #end
  }
}

// ----------------------------------------

camera {
  location  <-6.0, -16.0, 7.0>*0.6
  up z
  sky z
  look_at   <0.0, 0.0, 1.0>
  angle 30
}

light_source {
  <2000, -3000, 2700>
  color rgb <1.7, 1.5, 1.2>
}

sky_sphere {
  pigment {
    gradient z
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.2 rgb <0.2,0.3,0.9>]
    }
  }
}

// ----------------------------------------

#declare T_Env=
  texture {
    pigment { color rgb 1.5 }
    finish { ambient 0.05 diffuse 0.6 }
  }


union {
  plane { z, 0 }

  cylinder { -z, z*1.5, 0.3 }
  sphere { z*1.5, 0.6 }

  texture { T_Env }
}

// ----------------------------------------

#declare Obj1=MechSim_Show_Patch(0, 50, 50, true, true, -1, "")

object {
  Obj1

  texture {
    uv_mapping
    pigment {
      checker
      color rgb <0.9, 0.2, 0.1>
      color rgb <0.1, 0.1, 0.2>

      scale 0.075
    }
    finish {
      ambient 0.04
      diffuse 0.6
      specular 0.35
      reflection 0.15
    }
  }
}


Post a reply to this message

From: Eli
Subject: Re: problem(s) with tutorial file MegaPOV 1.1
Date: 14 Oct 2004 13:06:44
Message: <416eb224@news.povray.org>
Looks like MechSim_Show_Patch doesn't return an object when needed in:

   #declare Obj1=MechSim_Show_Patch(0, 50, 50, true, true, -1, "")

so Obj1 stays undefined.

If there is a way of putting a generated patch into an object or saving the 
thing as sdl-code to a file, I'd be very happy!


Post a reply to this message

From: Christoph Hormann
Subject: Re: problem(s) with tutorial file MegaPOV 1.1
Date: 17 Oct 2004 04:10:01
Message: <ckt93v$1o6$1@chho.imagico.de>
Eli wrote:
> The scene below gives me a "Expected 'object', undeclared identifier 'Obj1' 
> found instead" at line 118.
> I suspect it has to do with changes in MechSim_Show_Patch (mechsim.inc) 
> since MegPOV v1.10.....

Renders fine here.  Make sure you use the correct version of mechsim.inc 
(MSIM_INCLUDE_VERSION 0.3).

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 23 Sep. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.