DICE PACKS BUNDLE
  1. #1
    Doswelk's Avatar
    Join Date
    Jul 2005
    Location
    Surrey, UK
    Posts
    2,679

    Trying to create the Tour of Darkness Strafe template

    Guys,

    I'm trying to work out this old post to see if I can create the call of darkness strafe template.

    https://www.fantasygrounds.com/forum...custom+pointer

    Does anyone here understand the maths / spline curves that can explain to me how I work out what the 4 points I need to create for each control point?

    PW and I looked at this a while back and did not understand it, but would like to try again..

    Thanks in advance
    My players just defeated an army, had a dogfight with aliens, machine-gunned the zombies, stormed the tower, became Legendary and died heroically

    Yours are still on combat round 6

    Get Savage
    Ultimate License Holder.
    First GM to post a game for the original FG Con!

  2. #2
    I'm assuming that you don't need to do the curves in order or in a specific direction (i.e. they are all independently drawn)

    To do the lozenge shape you'll need 6 segments (one for each quarter circle and two straight segments)

    dimensions I used Circle diameter 2", straight segments 7" long, total length 9"

    I don't do lua and I haven't done more than write xml modules for my own use, but by cribbing from the example you gave, this should work if you insert it in place of the cone section.

    Code:
            -- strafe template facing in the negative y direction
            local kappa = 4/3*(sqrt(2)-1);
            -- circle segments at the origin
            local segment = { { startx, starty }, 
                              { startx + kappa*u, starty }, 
                              { startx + u, starty - (1 - kappa)*u }, 
                              { startx + u, starty - u } };
            table.insert(segments, segment);
            local segment = { { startx, starty }, 
                              { startx - kappa*u, starty }, 
                              { startx - u, starty - (1 - kappa)*u }, 
                              { startx - u, starty - u } };
            table.insert(segments, segment);
            -- straight segments
            local segment = { { startx + u, starty - u }, 
                              { startx + u, starty -2*u }, 
                              { startx + u, starty - 7*u }, 
                              { startx + u, starty - 8*u } };
            table.insert(segments, segment);
            local segment = { { startx - u, starty - u }, 
                              { startx - u, starty -2*u }, 
                              { startx - u, starty - 7*u }, 
                              { startx - u, starty - 8*u } };
            table.insert(segments, segment);
            -- circle segments at the far end
            local segment = { { startx, starty -9*u }, 
                              { startx + kappa*u, starty -9*u }, 
                              { startx + u, starty - (8 + kappa)*u }, 
                              { startx + u, starty - 8*u } };
            table.insert(segments, segment);
            local segment = { { startx, starty -9*u }, 
                              { startx - kappa*u, starty -9*u }, 
                              { startx - u, starty - (8 + kappa)*u }, 
                              { startx - u, starty - 8*u } };
            table.insert(segments, segment);
    Last edited by grapper; January 6th, 2013 at 16:47.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
STAR TREK 2d20

Log in

Log in