Nevermind, problem has been solved RE: [Edu-sig] no Python 2.0 bindings for Lightflow until now ...
Charlie Derr
charlie@webmind.com
Fri, 2 Feb 2001 13:34:15 -0500
Sorry for the clutter. Markus already pointed me in the right direction,
and I've been playing with Lightflow (on linux at least), and it's great!!!!
~c
|-----Original Message-----
|From: edu-sig-admin@python.org [mailto:edu-sig-admin@python.org]On
|Behalf Of Charlie Derr
|Sent: Wednesday, January 31, 2001 8:24 PM
|To: Markus Gritsch; Jason Cunliffe; edu-sig@python.org
|Subject: RE: [Edu-sig] no Python 2.0 bindings for Lightflow until now
|...
|
|
|Hi all,
| I hope you'll forgive this tech-support-like question being
|posted to a
|non-tech-support list, but there's been so much discussion about Lightflow
|here, that I thought someone would be bound to know the answer...
|
| I am an enthusiastic (but not so very experienced)
|pythonista. I just
|downloaded the lightflow python module for windows (NT in my case). I have
|python 1.5 installed, but the instructions in the Lightflow documentation
|don't seem to make much sense to me.
|
|<quote from Lightflow\CS\Docs\Chap1.html>
|
|Tutorial
|The following example is one of the simplest possible scenes that can be
|rendered: a sphere in the empty space.
|Now start your preferred text editor and type the following text. When you
|have finished save it in a file, and then start python from a console
|passing the file name as an input (for example, if you have saved the file
|as example.py, just type: python example.py).
|
|
|-------------------------------------------------------------------
|---------
|----
|
|#include < Lightflow/LfLocalSceneProxy.h >
|
|void main(void)
|{
| LfLocalSceneProxy* s = new LfLocalSceneProxy();
| LfArgList list;
|
| list.Reset();
| list << "position" << LfPoint( 5.0, -5.0, 4.0 );
| list << "color" << LfColor( 300.0, 300.0, 300.0 );
| s->LightOn( s->NewLight( "point", list ) );
|
| list.Reset();
| list << "ka" << LfColor( 0, 0, 0.5 );
| list << "kc" << LfColor( 1, 0.5, 0.5 );
| list << "kd" << 0.5;
| list << "km" << 0.1;
| LfInt plastic = s->NewMaterial( "standard", list );
|
|
| s->MaterialBegin( plastic );
|
| list.Reset();
| list << "radius" << 1.0;
| s->AddObject( s->NewObject( "sphere", list ) );
|
| s->MaterialEnd();
|
|
| list.Reset();
| list << "file" << "ball1.tga";
| LfInt saver = s->NewImager( "tga-saver", list );
|
| s->ImagerBegin( saver );
|
| list.Reset();
| list << "eye" << LfPoint( 0, -4, 0 );
| list << "aim" << LfPoint( 0, 0, 0 );
| LfInt camera = s->NewCamera( "pinhole", list );
|
| s->ImagerEnd();
|
| s->Render( camera, 300, 300 );
|
| delete s;
|}
|
|
|
|</quote from lightflow manual>
|
|
|
|
|My problem is that this doesn't really look like python to me.
|I'm guessing
|it's either c or c++. When i follow the instructions given above the code
|(i pasted the code into a file exam.py) , i get:
|
|Microsoft(R) Windows NT(TM)
|(C) Copyright 1985-1996 Microsoft Corp.
|
|C:\>cd python
|
|C:\Python>cd lf
|
|C:\Python\lf>ls
|Lightflow exam.py
|
|C:\Python\lf>python exam.py
| File "exam.py", line 3
| void main(void)
| ^
|SyntaxError: invalid syntax
|
|
|
|Do i need to use gcc to compile this file first? (I have the
|cygwin port of
|gcc, but am unfamiliar with its use) I tried, but it wasn't able to find
|the included header file. While you folks are answering (or not) I'll be
|trying to get lightflow to work on linux -- maybe this stuff makes more
|sense there.
|
|
| thanx very much for any information,
| ~c
|
|
|
|_______________________________________________
|Edu-sig mailing list
|Edu-sig@python.org
|http://mail.python.org/mailman/listinfo/edu-sig