Results 1 to 1 of 1

Math Help - Rotating a partial section of a circle around its center with constant velocity

  1. #1
    Newbie
    Joined
    Apr 2009
    Posts
    1

    Rotating a partial section of a circle around its center with constant velocity

    Halo all,


    I am trying to develop a program with the following aim.

    A partial section of a circle which rotates around its center with constant angular velocity.


    Description:


    A circle with radius 150 mm (center located at 0,0) is equipped with known points along its circumference as shown in Figure below. A partial section (with constant length) should be identified and observed as it moves around the circle. With the below mentioned code (written in FORTRAN) i am able to locate two points (point A and B as they move with time but not able to capture points lying between these two points (A and B). Please check the code below. Thank you in advance.

    c calculate the new position
    c measure the Difference to the Center
    difx1 = PointAx - originx
    dify1 = PointAy - originy

    difx2 = PointBx - originx
    dify2 = PointBy - originy

    c calculate the angle in RADIANs
    c Theta = w * time w is angular velocity in rad/sec
    radns = angvel * time

    newx = cos(radns)
    newy = sin(radns)

    dx1 = (difx1 * newx) - (dify1 * newy)
    dx2 = (difx2 * newx) - (dify2 * newy)

    dy1 = (difx1 * newy) + (dify1 * newx)
    dy2 = (difx2 * newy) + (dify2 * newx)

    PointAx = originx + dx1
    PointAy = originy + dy1

    PointBx = originx + dx2
    PointBy = originy + dy2

    c check weather this node LIES in the heating Zone / HERE IS PROBLEM, How to locate region between two points A and B
    if((points(1) .lt. PointBx) .or. (points(1) .gt. PointAx)) then

    c NOT in the region
    c DO Not apply anything

    else
    xin = .true.
    end if

    c / HERE IS PROBLEM, How to locate region between two points A and B
    if((points(2) .lt. PointAy) .or. (points(2) .gt. PointB)) then

    C Not in the region
    C DO Not apply anything

    else
    yin = .true.
    end if

    IF (xin .and. yin) then

    c WE are in the Region

    end if
    Attached Thumbnails Attached Thumbnails Rotating a partial section of a circle around its center with constant velocity-rotating_bc.jpg  
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 15
    Last Post: November 15th 2010, 12:46 PM
  2. Replies: 7
    Last Post: March 15th 2010, 04:10 PM
  3. Constant Velocity Problem
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: June 29th 2007, 06:14 PM
  4. Rotating points around a known center
    Posted in the Pre-Calculus Forum
    Replies: 4
    Last Post: March 7th 2007, 03:23 PM
  5. Rotating circle
    Posted in the Calculus Forum
    Replies: 3
    Last Post: November 17th 2006, 12:41 PM

Search Tags


/mathhelpforum @mathhelpforum