POV-Ray : Newsgroups : povray.general : "Loop-the-loop" Server Time
4 Aug 2024 02:20:07 EDT (-0400)
  "Loop-the-loop" (Message 11 to 12 of 12)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Remco de Korte
Subject: Re: "Loop-the-loop"
Date: 2 Oct 2003 20:07:42
Message: <3F7CBD45.2D19A830@onwijs.com>
None wrote:
> 
> "-s0da-" <ske### [at] msncom> wrote in news:3f7ca757$1@news.povray.org:
> 
> > I'm pretty sure this person meant a loop-the-loop as in
> > a track that goes in a loop.  i.e.  flips over.
> 
> Yes, exactly!  Also like they used to have with "Hot Wheels" miniature car,
> a plastic track loop.  You let go of the car from the top of the track, it
> goes down and "loops the loop" without falling and continues down the
> track.

A mesh would be fairly easy to set up. Something like this:

#declare step=10;

#declare loop=union{

  box{<-3,-10,0><-1,-11,10>}
  box{<1,-10,-10><3,-11,0>}
  
  mesh{
    #declare p1a=<-3,-10,0>;
    #declare p2a=<-1,-10,0>;
    #declare p3a=<-1,-11,0>;
    #declare p4a=<-3,-11,0>;
  
    #declare p1=p1a;
    #declare p2=p2a;
    #declare p3=p3a;
    #declare p4=p4a;
    
    #declare tt=0;#while(tt<=360)
  
      #declare p1b=p1; 
      #declare p2b=p2; 
      #declare p3b=p3; 
      #declare p4b=p4; 
  
      #declare p1=vrotate(p1a,<tt,0,0>)+<tt/90,0,0>;
      #declare p2=vrotate(p2a,<tt,0,0>)+<tt/90,0,0>;
      #declare p3=vrotate(p3a,<tt,0,0>)+<tt/90,0,0>;
      #declare p4=vrotate(p4a,<tt,0,0>)+<tt/90,0,0>;
  
      triangle{p1,p1b,p2}
      triangle{p2,p2b,p1b}
      triangle{p3,p3b,p4}
      triangle{p4,p4b,p3b}
      triangle{p1,p1b,p4}
      triangle{p4,p4b,p1b}
      triangle{p2,p2b,p3}
      triangle{p3,p3b,p2b}

  
    #declare tt=tt+step;#end
  }
  
  pigment{rgb 1}
}
  

You could add all sorts of details this way, simply by adding points and
triangles. 
BTW This looks a bit blocky, for test versions, but you can lower the
value of step to get a smoother result.

Remco


Post a reply to this message

From: None
Subject: Re: "Loop-the-loop"
Date: 2 Oct 2003 23:55:54
Message: <Xns9408F3611863FNone@204.213.191.226>
Remco de Korte <rem### [at] onwijscom> wrote in
news:3F7CBD45.2D19A830@onwijs.com: 

> A mesh would be fairly easy to set up. Something like this:
> [...]

Wow, cool! that looks very nice!  Thanks!  I should be able to use 
smooth_triangle{} using your technique for the perpendicular normal (or 
perhaps pointing the normal to the center will ensure that the loop would 
keep a rolling ball on track?)


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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