From: Nick L. <ni...@ja...> - 2005-10-02 23:45:33
|
Many thanks Bruce. No need to apologise though, vpython is excellent as it is. It's helping me in learning python and damn good fun to boot :) I'll go have a look at Pov-Ray and see what it's all about. Thanks again, Nick . > -----Original Message----- > From: Bruce Sherwood [mailto:Bru...@nc...] > Sent: 01 October 2005 19:53 > To: Nick Lunt > Cc: Vpython > Subject: Re: [Visualpython-users] Cast a shadow > > > Sorry, currently there's no way to cast shadows. And you can only put > lights at infinity. Jonathan Brandmeyer is working on a version that > will let you put lights anywhere, but even with that advance there won't > be shadows, which typically require ray-tracing, which is slow. A minor > footnote is that at vpython.org there is a routine for exporting a > VPython scene to Pov-Ray, a freeware ray tracer, which does > produce shadows. > > Bruce Sherwood > > Nick Lunt wrote: > > >Hello, > > > >I've have just installed vpython and have to say I am loving > messing around > >with it. > > > >Anyhoo, I've had a look through the archives but unfortunately I > could not > >find a search function for past posts, hence my question, which I'm sure > >must of been asked before ;) > > > >Is there anyway to have objects cast a shadow ? I can see that > when I rotate > >a box object that there is a shadow but when I move a sphere > object around > >inside a box (or between two boxes as in the tutorial) there is > no shadow of > >the sphere. > > > >I can get the current vectors for the default 2 lights (print > scene.lights) > >but I'm unsure of how to manipulate my own lights (or the > default ones) to > >get a moving object inside a box to generate a shadow. > > > >So basically can anyone please give me a quick rundown on how to > generate my > >own lighting to enable shadows on moving objects ? > > > >I have attached my code in the hope that it my help to explain what I'm > >trying to do. > > > >Many thanks, > >Nick . > > > > > > > > > > -- > No virus found in this incoming message. > Checked by AVG Anti-Virus. > Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 30/09/2005 > > |