POV-Ray : Newsgroups : povray.binaries.images : Rail segments assembly problem : Re: Rail segments assembly problem Server Time
31 Jul 2024 20:21:21 EDT (-0400)
  Re: Rail segments assembly problem  
From: Jörg 'Yadgar' Bleimann
Date: 12 Apr 2009 09:55:48
Message: <49e1f2e4$1@news.povray.org>
High!

Martin wrote:

> You are not taking into account the bended sector rotation

>         #declare dir= select(RailElements[i][1],1,-1,-1);
>         #declare pt= vrotate(x*(RailElements[i][2]+diff)*dir,
>                          RailElements[i][1]*y)-x*RailElements[i][2]*dir;
>         #declare trans= trans+vrotate(pt,y*d); //<-- solved

 From 400 metres above, your code looks like a solution... but then I 
started animating a camera ride along the rail, and when I came to the 
end of the first curved section, I got the result attached here...

I just can't figure out the reason... I tried several values for "diff", 
the closest I found was 0.09 (and -0.09 respectively for left bends), 
but even then only the end of the right bend roughly fits together with 
the second straight section, not the end of the second curved (left 
bend) section visible to the left of the image... I'm totally clueless!

See you in Khyberspace!

Yadgar


Post a reply to this message


Attachments:
Download 'cabinrailway_0001.jpg' (9 KB)

Preview of image 'cabinrailway_0001.jpg'
cabinrailway_0001.jpg


 

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