killingdyl
Active Member
- Reaction score
- 6
Ok so im no great mathematician but i copied this equation down from wikipedia and used it to create hypocycloids, but im trying to make a hypocycloid pentagram which is using a repeating decimal (5/3 = 1. 6666...) When i do that it doesnt work and i just get a dot. Someone want to help?
P.s. the 5/3 i got from this website http://mathworld.wolfram.com/Hypocycloid.html, its about half way down the page. Thanks
this is the code:
P.S. Not fixing leaks or anything, i just want my pentagram to work.
P.s. the 5/3 i got from this website http://mathworld.wolfram.com/Hypocycloid.html, its about half way down the page. Thanks
this is the code:
JASS:
function Trig_Test_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 039;A004039; ) ) then
return false
endif
return true
endfunction
function Trig_Test_Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local unit array dummy
local player p = GetOwningPlayer(caster)
local real x = GetUnitX(caster)
local real y = GetUnitY(caster)
local real xx
local real yy
local real r = 200
local real k = 4
local integer i = 1
local unit fog = null
local group g = CreateGroup()
loop
exitwhen i > 360
set xx = (r * (k - 1) * Cos((i) * bj_DEGTORAD)) + (r * Cos(((k - 1) * (i)) * bj_DEGTORAD))
set yy = (r * (k - 1) * Sin((i) * bj_DEGTORAD)) - (r * Sin(((k - 1) * (i)) * bj_DEGTORAD))
call CreateUnit(p, 039;h004039;, xx, yy, 0)
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_Test takes nothing returns nothing
set gg_trg_Test = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Test, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Test, Condition( function Trig_Test_Conditions ) )
call TriggerAddAction( gg_trg_Test, function Trig_Test_Actions )
endfunction
P.S. Not fixing leaks or anything, i just want my pentagram to work.