POV-Ray : Newsgroups : povray.binaries.images : Tangents with analytical geomtery Server Time
28 Mar 2024 07:47:24 EDT (-0400)
  Tangents with analytical geomtery (Message 11 to 18 of 18)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Thomas de Groot
Subject: Re: Tangents with analytical geomtery
Date: 23 Oct 2019 02:25:12
Message: <5daff248@news.povray.org>
Op 23/10/2019 om 02:56 schreef Bald Eagle:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> WHEEEEE!
> 

Nicely done, sir. Now take your dried frog pills (as Stephen would say). :-)

-- 
Thomas


Post a reply to this message

From: Gergely Szaktilla
Subject: Re: Tangents with analytical geomtery
Date: 23 Oct 2019 12:30:06
Message: <5db0800e$1@news.povray.org>
On 23.10.19 02:56, Bald Eagle wrote:
> WHEEEEE!

Yeah!

Reminds me of Helga Philipp



It's nice to see how things evolve :-)

Gregor


Post a reply to this message

From: Bald Eagle
Subject: Re: Tangents with analytical geomtery
Date: 27 Oct 2019 18:55:01
Message: <web.5db61fe221826f334eec112d0@news.povray.org>
So I cleaned up a few things,

made the native prism transparent to allow for further development
moved the small side and rotated view to the side, and widened the view
added a small region of black to each end of the color map to make things
clearer, esp in the case of small wrong-direction arcs
Put the image map at the back, labeled the gridlines...
switched over to orthographic camera

Saving that file as a backup and proceeding to try to model the original part
highlighted the need to consider the cases where adjacent circles are not
exterior to each other, and likely a need to include a proper _point_ where 2
linear segments can meet at a bend.

Also need to work out - or find - some code to keep most of the scene elements a
constant perceived size - like the line width, text size, etc when the camera
zoom is changed to switch between large and small dimension designs.


I made some progress on sorting out 0,1,2,3,4 tangent cases, and filtering the
code to bypass calculations for nonexistent tangent lines.

Hopefully I will have the time, energy, and focus to work through most of that
over the next several days.


Post a reply to this message


Attachments:
Download 'serpentinebeltprism_dev1.png' (640 KB)

Preview of image 'serpentinebeltprism_dev1.png'
serpentinebeltprism_dev1.png


 

From: Leroy
Subject: Re: Tangents with analytical geomtery
Date: 29 Oct 2019 16:40:00
Message: <web.5db8a2f321826f33a83d0ced0@news.povray.org>
Very well done!


Post a reply to this message

From: Leroy
Subject: Re: Tangents with analytical geomtery
Date: 5 Nov 2019 15:10:05
Message: <web.5dc1d6ab21826f33632789d20@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> So I tried doing this "the old way" by calculating the angle between the center
> line and the tangent and then rotating and translating - but that got too messy
> too fast for my second test case, and the first one was hairy enough.
>
> So I implemented a fully analytical method to calculate the endpoints of the
> tangent lines "in place" for any arbitrary set of circles.
>
> Input for the macro is just a list of circle centers and radii.
>
> Now to implement some further logic, and then try non-circular "pulleys", and
> linear bends.

Why did you start this? I had to try it for my self. Not the prism part but
getting the belt around a set of pulleys.
 I spent the last week working on it. I started with placing a random number of
pulleys of different sizes around the origin. Then did a simple test to mark
weather the belt was inside or outside a particular pulley.
 That test was:: if the vlength of the midpoint of the two pulleys on each side
of the test pulley was shorter than the vlength of the test then the belt was on
the outside.

 Then I came the deciding which tangent formula to use and calculating the
tangent on two adjacent pulleys. There are basic two formulas one for the cross
over, one for going from Outside to Inside, and the other for Outside to
Outside. Those formula can also be used for the reversed Inside to Outside and
Inside to Inside.

So I had those all 4 tangents that you have shown. But I only needed the one
tangent for two pulleys.

 Then came the curved part of the belt. Each pulley has two tangent points, one
where the belt comes in and one where the belt goes out. Using the
Inside/Outside value and those tangent points I make a prism to cut a torus. Did
I mention the the belt was made of cylinders.

 While testing lots of randomly place Pulleys I came across an error in the
Inside/Outside test and made a second routine that took in account the radius of
the pulleys involved.
 When all is said and done I have 4 arrays::
      Location, Size, Inside/Outside, Tangent points

Now maybe I'll try and animate it;)
Here a look:


Post a reply to this message


Attachments:
Download 'pully1.jpg' (21 KB)

Preview of image 'pully1.jpg'
pully1.jpg


 

From: Bald Eagle
Subject: Re: Tangents with analytical geomtery
Date: 5 Nov 2019 16:55:00
Message: <web.5dc1efa321826f334eec112d0@news.povray.org>
"Leroy" <whe### [at] gmailcom> wrote:

> Why did you start this?

Because making parts from CSG can be a big pain, and I figured that I could
model a prism which would give me smooth curves and the proper alignment with
the straight sections.  Not so easy without a good modeler or drawing program.

> I had to try it for my self. Not the prism part but
> getting the belt around a set of pulleys.

I did that ages ago.  I used Friedrich Lohmueller's method, with the angles and
all of that, but doing that for multiple pulleys was a bit overwhelming.
So I found a purely analytical method using the radii and the coordinates of the
centers.

>  I spent the last week working on it. I started with placing a random number of
> pulleys of different sizes around the origin. Then did a simple test to mark
> weather the belt was inside or outside a particular pulley.
>  That test was:: if the vlength of the midpoint of the two pulleys on each side
> of the test pulley was shorter than the vlength of the test then the belt was on
> the outside.
>
>  Then I came the deciding which tangent formula to use and calculating the
> tangent on two adjacent pulleys. There are basic two formulas one for the cross
> over, one for going from Outside to Inside, and the other for Outside to
> Outside. Those formula can also be used for the reversed Inside to Outside and
> Inside to Inside.

Nice - when I was analyzing the possible configurations, I realized that it
could get quite complicated, and there was no good way to automate the process -
and different results might be wanted compared to what an algorithm chose.

> So I had those all 4 tangents that you have shown. But I only needed the one
> tangent for two pulleys.

Correct, unless you only have two pulleys.   ;)
I also knew that one might want to model a system with an idler pulley or
tensioner, so i made everything manually selectable.

>  Then came the curved part of the belt. Each pulley has two tangent points, one
> where the belt comes in and one where the belt goes out. Using the
> Inside/Outside value and those tangent points I make a prism to cut a torus. Did
> I mention the the belt was made of cylinders.

Nice.   The animation I did used a belt made out of truncated cones in order to
simulate a V-belt, and to have an odd-colored cone to mark the belt and give a
better visual cue.


> Now maybe I'll try and animate it;)
> Here a look:

You've done a great job as always   :)

Most belt animations are done with only a short, repeating series of frames, but
with multiple radii, or if marking the pulleys or belt to really show the
rotation, then what constitutes a "single" cycle can be much longer and somewhat
challenging to calculate.


Post a reply to this message

From: Leroy
Subject: Re: Tangents with analytical geomtery
Date: 12 Nov 2019 14:00:01
Message: <web.5dcb00ce21826f33fc7719580@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
>
> Most belt animations are done with only a short, repeating series of frames, but
> with multiple radii, or if marking the pulleys or belt to really show the
> rotation, then what constitutes a "single" cycle can be much longer and somewhat
> challenging to calculate.

I hadn't even thought of that!

I was so intent on the math of the problem, that I didn't even think of making a
looped animation. With 10 pulleys that could run awhile!

 I did make a prism belt and 'real' pulleys. I got into a problem with the
texturing of the belt. My idea was to have a texture scaled so that it would be
the length of the belt and translate it to each section of the belt parts.
 Then all you have to do to animate the belt is change the translate value.
I did get a pigment_map to work, using the toroidal Warp for around the pulleys.
 While writing this I had a Idea on how to get texture to work. Got to give it a
try.

 I still don't know why I'm working on this :0
 Well it bets any other thing I need to do :)

 Have Fun!


Post a reply to this message

From: Bald Eagle
Subject: Re: Tangents with analytical geomtery
Date: 12 Nov 2019 17:15:01
Message: <web.5dcb2dcc21826f334eec112d0@news.povray.org>
"Leroy" <whe### [at] gmailcom> wrote:

> I hadn't even thought of that!

Yeah.   I can't even remember how I did it with just my 2 pulleys - I'll have to
go back and look some time.

> I was so intent on the math of the problem, that I didn't even think of making a
> looped animation. With 10 pulleys that could run awhile!

Yeah - I'll have to see if there's an equation for that.


> I did get a pigment_map to work, using the toroidal Warp for around the pulleys.
>  While writing this I had a Idea on how to get texture to work. Got to give it a
> try.

That's clever.  You should have seen the headache I went through with radial
recently.  :O

>  I still don't know why I'm working on this :0
>  Well it bets any other thing I need to do :)

Ha!   You and me both.
Something always captures my interest and I pursue it --- BECAUSE!

I hope to see some of your work on this soon.  Maybe I can draw you further into
this with --- GEARS!  :D

Glad you're having fun though.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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