! ! Random Walk Next Generation ! new Fri May 8 06:53:02 AM UTC 2026 ! ! this crapware is released by tTh under the ! DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE ! ! --------------------------------------------------------- program rndwlkng use genplotting implicit none type walker real :: xloc, yloc ! where I am ? real :: heading ! direction in degrees real :: powa ! correlated to nothing end type walker type (walker) drunky integer pass call srand(time()) call genp_init(0, "WS/rndwlkng.scratch") do pass=1, 73 drunky%xloc = 5555 * (rand(0) - 0.50) drunky%yloc = 5555 * (rand(0) - 0.50) drunky%heading = 360 * rand(0) drunky%powa = 6.00 call move_the_walker(drunky, 700, mod(pass, 6)+1) end do call genp_end(0) call genp_do_render("WS/rndwlkng.scratch", "rndwlkng.tga", 512, 512) contains ! --------------------------------------------------------- subroutine move_the_walker(bob, nbmove, col) type (walker), intent(inout) :: bob integer, intent(in) :: nbmove, col integer :: idx real :: rad, mv, dx, dy call genp_move(bob%xloc, bob%yloc) do idx=1, nbmove rad = ( 3.141592654 * bob%heading ) / 180.0 mv = 1.555 + (bob%powa * rand(0)) dx = mv * sin(rad) dy = mv * cos(rad) bob%xloc = bob%xloc + dx bob%yloc = bob%yloc + dy bob%heading = bob%heading + 42.42 * (rand(0) - 0.50000) call genp_draw(bob%xloc, bob%yloc, col) enddo end subroutine ! --------------------------------------------------------- end program ! ---------------------------------------------------------