jpsheader.jpg (29354 bytes)

AutoLisp Home

Home

 

 

R

O

L

L

I

N

G

 

 

B

A

L

L

 

 

 

E

X

P

E

R

I

M

E

N

T

 

 

 

Rollin_Ball.lsp  Updated!

Find MidBoundary between two polylines.

 

 


Updates!

  Wish List complete.  Experimental phase over!  Thanks to Guenther Bittner.  Guenther has done an excellent job revamping this code!  The program is now ready for release. 

Rolling_Ball - This program was an experiment to find the mid-boundary between two polylines using the rolling ball theory.  Experiment Complete!

The rolling ball theory:  The mid-boundary should be a line running from center to center of the largest ball possible rolling between two boundaries.   Illustration:

Rollin00.JPG (16561 bytes)

   The red lines above are the boundaries.  The yellow circles represent the ball rolling between the two boundaries.  The blue line is the mid-boundary. 

 

  This program asks you to select the starting end of the first and second boundaries.  It then asks for the increment for the ball movement each check.   This is shown in the drawing below.

Rollin01.JPG (18233 bytes)

 

    The program starts at the end of boundary 1 and draws a circle.  The circle touches boundary 1 and grows outward perpendicular to boundary 1.   It checks for an intersection with boundaries 1 & 2.  If no intersection is found, the size if the circle is increased.

 

Rollin02.JPG (10049 bytes)

   This process continues until an intersection is found.   If it intersects with boundary 1, the process is stopped and it starts over at the next point down boundary 1.   In th illustration below, an intersection point was found on boundary 2.

Rollin03.JPG (14744 bytes)

 

   If an intersection with boundary 2 is found, the program begins to decrease the circle size in smaller increments.  This continues until an intersection is not found.  The last valid intersection point is stored.

Rollin04.JPG (12092 bytes)

 

   The white intersection point below represents the last valid intersection point stored.  The program then finds a new point down boundary 1 to start the process over.

Rollin05.JPG (11278 bytes)

 

    This continues until we reach the end of boundary 1.   The illustration below shows the valid mid-boundary points found along with the final mid-boundary line.

Rollin06.JPG (46883 bytes)

 

    You can decrease the increment to check for intersections and decrease the increment to move down boundary 1 to get better results.

 


Updates!

  Wish List complete.  Thanks to Guenther Bittner.   Guenther has done an excellent job revamping this code.  The program is now ready for release.

To Download the program click   <here>.

If you have any questions about the program click here.


AutoLisp Home

Home

All questions/complaints/suggestions should be sent to JefferyPSanders.com

Last Updated April 1st, 2013

Copyright 2002-2013 JefferyPSanders.com.  All rights reserved.