-
February 18th, 2019, 01:03 #51
Hrm. That's what I had before... and it stopped working way back.. I've just gotten around to trying to fix it.
I had the whole Dulox Toolkit thing setup... and it was working for Equilateral Triangles... but.. yeah.. not since November of 2016 apparently.
It was drawing the end points but none of the lines..
Never did figure out how to make the Hexagon work though.
Code:<windowclass name="imagewindow" merge="join"> <sheetdata> <imagecontrol name="image"> <default snap="off" drawingsize="500,500" snaphex="vertexandcenter" gridtype="hexrow" /> <pointertypes> <arrow> <icon>pointer</icon> <label>Draw Arrow</label> </arrow> <circle> <icon>pointer_circle</icon> <label>Draw Circle</label> </circle> <custom name="60ConePointer"> <icon>pointer_cone</icon> <label>Draw 60-Degree Cone</label> </custom> <custom name="TrianglePointer"> <icon>pointer_cone</icon> <label>Draw Triangle</label> </custom> <custom name="HexPointer"> <icon>pointer_circle</icon> <label>Draw Hex</label> </custom> </pointertypes> </imagecontrol> </sheetdata> </windowclass>
Code:<cone> <icon>pointer_cone</icon> <label>Draw Cone</label> </cone>
Full License Operator - You must have a 'Lite' License to play in my games.
Member and GM in the Fantasy Grounds Pathfinder Society Group.
PFS Fantasy Grounds Forum
FG Community Teamspeak Server: ts.fg-con.com
Interested in Custom Character Portraits and Tokens? Contact me.
-
February 18th, 2019, 01:05 #52
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,559
I'm assuming that it is all still working, as it is used for almost all the Savage Worlds pointers and I haven't heard any issues. Also, I haven't touched that code since 2016.
JPG
-
February 18th, 2019, 03:39 #53
OK.. so I figured it out and triangles are working again.
Now on to Hexagons.Full License Operator - You must have a 'Lite' License to play in my games.
Member and GM in the Fantasy Grounds Pathfinder Society Group.
PFS Fantasy Grounds Forum
FG Community Teamspeak Server: ts.fg-con.com
Interested in Custom Character Portraits and Tokens? Contact me.
-
February 18th, 2019, 05:13 #54
OK.. so I took the one side of the Equilateral Triangle and that draws one side of the Hexagon.. all I need to do.. (in theory) is flip it around 5 more times to get the various other sides.
I could probably use a little help with the math... it's been a while.
Code:function fpLineCurve(nStartLineXCoord,nStartLineYCoord,nEndLineXCoord,nEndLineYCoord,nOffset) local aCurve = {{nStartLineXCoord,nStartLineYCoord-nOffset}, {nStartLineXCoord,nStartLineYCoord-nOffset}, {nEndLineXCoord,nEndLineYCoord-nOffset}, {nEndLineXCoord,nEndLineYCoord-nOffset}}; return aCurve; end function fpHexPointer(aShapeCurves,nRadius) local nSide = math.sqrt((nRadius*nRadius)+((nRadius*nRadius)/3)); table.insert(aShapeCurves,fpLineCurve(-nSide/2, 0, nSide/2, 0, nRadius)); table.insert(aShapeCurves,fpLineCurve(-nSide/2, 0, nSide/2, 0, -nRadius)); end
Reverse the Radius gets you the opposite line.
If I set up 3 of these.. it makes a Hexagon.Last edited by Blackfoot; February 18th, 2019 at 16:52.
Full License Operator - You must have a 'Lite' License to play in my games.
Member and GM in the Fantasy Grounds Pathfinder Society Group.
PFS Fantasy Grounds Forum
FG Community Teamspeak Server: ts.fg-con.com
Interested in Custom Character Portraits and Tokens? Contact me.
-
February 20th, 2019, 08:02 #55
Victory!!
The Hexagonal Pointer!
Code:function fpHexPointer(aShapeCurves,nRadius) local nSide = math.sqrt((nRadius*nRadius)+((nRadius*nRadius)/3)); table.insert(aShapeCurves,fpLineCurve(-nSide,0,-nSide/2,-nRadius,0)); table.insert(aShapeCurves,fpLineCurve(-nSide,0,-nSide/2,nRadius,0)); table.insert(aShapeCurves,fpLineCurve(-nSide/2,0,nSide/2,0,-nRadius)); table.insert(aShapeCurves,fpLineCurve(-nSide/2,0,nSide/2,0,nRadius)); table.insert(aShapeCurves,fpLineCurve(nSide,0,nSide/2,-nRadius,0)); table.insert(aShapeCurves,fpLineCurve(nSide,0,nSide/2,nRadius,0)); end
Full License Operator - You must have a 'Lite' License to play in my games.
Member and GM in the Fantasy Grounds Pathfinder Society Group.
PFS Fantasy Grounds Forum
FG Community Teamspeak Server: ts.fg-con.com
Interested in Custom Character Portraits and Tokens? Contact me.
-
February 20th, 2019, 14:58 #56
Just to geek out on trig for a moment. Equal width/distance from the origin point is not an equilateral triangle, as Moon said. If you think of an equilateral triangle being two right triangles back to back, then each of those right triangles will have tan(x) = 0.5, where x is the angle between adjacent and hypotenuse. The total angle is then 2x, because, two triangles. tan(x) = 0.5 is the same as arctan(0.5) = x, which is ~26.56. Double that, and you get 53.12, or, what Moon said. There will be a quiz on Monday...
https://www.mathsisfun.com/sine-cosine-tangent.html
Since equilateral triangles have 3 60 degree angles, by the same logic as above, the ratio of distance/width is 2 * tan(30) = ~1.15Last edited by darrenan; February 20th, 2019 at 15:06.
-
February 20th, 2019, 18:04 #57
Dork.
Yeah yeah... I meant oh bother.. Whatever. You know what I meant.
Check out my HEX pointer!
Full License Operator - You must have a 'Lite' License to play in my games.
Member and GM in the Fantasy Grounds Pathfinder Society Group.
PFS Fantasy Grounds Forum
FG Community Teamspeak Server: ts.fg-con.com
Interested in Custom Character Portraits and Tokens? Contact me.
-
February 20th, 2019, 23:31 #58
who has two thumbs and was in math club in high school? this guy :-)
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks