Just check if the next step + actual step is out of boundaries of your
side, if so your snail changed from plane.

2012/8/6 Rogowski, David <david.rogowski@ttu.edu>

> I am trying to create a constrained random walk model to simulate a
> snail's movement to use as a control to test against actual snail movement.
> I am testing whether a snail selects for a certain depth within a convex
> polygon aquarium (28 x 560 x 220 x 608mm) with 608 mm being the diagonal
> and the bottom of the aquarium.
>
> Has anyone written code for this type of problem that they would be
> willing to share? I can code for a random walk and confine it to a
> rectangle but am kind of at a loss as to how to constrain the walk in
> regards to a diagonal.
>
> Thanks,
>
> david
>
> David Rogowski
>
>
> david.rogowski@ttu.edu
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>



-- 
Currículo: http://lattes.cnpq.br/7541377569511492

	[[alternative HTML version deleted]]

