-
January 6th, 2013, 09:42 #1
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 advanceMy 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
First GM to post a game for the original FG Con!
-
January 6th, 2013, 16:44 #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