Date: 2020/01/11 17:56:27 UTC-08:00
Type: Denizen Script
CircleProc:
type: procedure
debug: false
definitions: location|radius|density|stretch|loops
##EX <player.location> 3 100 0 1
##Returns a list of points around a specified location in a circle
script:
- define 2pi <util.pi.mul[<element[2].mul[<[loops]||1>]>]>
- define particle_locations li@
- define radius_location <location[<[radius]>,0,0]>
- repeat <[density]>:
- define stretchmax <[stretch].div[<[density]>].mul[<[value]>]>
- define point_location <[radius_location].rotate_around_y[<[2pi].div[<[density]>].mul[<[value]>]>].with_y[<[stretchmax]>]>
- define particle_locations <[particle_locations].include[<[location].add[<[point_location]>]>]>
- determine <[particle_locations]>