Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5969451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:13:58+00:00 2026-05-22T20:13:58+00:00

In a plane (two dimensional), a path can be represented by a sequence of

  • 0

In a plane (two dimensional), a path can be represented by a sequence of (n+1) points (Xo,Yo),(X1,Y1),…,(Xn,Yn) such that, for any i (integer 1 < i < n-1):

Pi(vector) = [Xi-X(i-1),Yi-Y(i-1)]

representing the ith step, is a vector with the length Pi, and a value of the change of direction between the vectors Pi and P(i+1) is measured algebraically (don’t know how) by the turning angle a(i).

Like any angular distribution (of changes of direction) it is characterized by a mean vector which is taken to be symmetrical and to have angular mean Φ = o. The approach to this analysis involves numerical simulations, since the algebraic approach seems to be too complex and I have to use a pseudo-random Gaussian generator to obtain continuous values from a normal distribution with a mean of 0 and a standard deviation σ (0.1-1.2)radians to simulate a path.

So after each step with the length P (is constant i.e 125km), the value of the change of direction (turning angle a(i)) is determined by the pseudo-random generator for a given value of σ, which is constant along the path. And then makes a step in the next direction, and so on.

Some useful equations:

a(i) ~ n(0,σ)
Θ(i+1) = Θ(i) + a(i)
X(i+1) = Xi + P Cos[Θ(i+1)]
Y(i+1) = Yi + P Sin[Θ(i+1)]

where Θi represents the direction of the ith step. The direction of the first step Θi, is chosen at random according to a uniform angular distribution by a pseudo-random uniform generator. Turning angles are recorded from -Pi to Pi

So my question is:

How can I take i.e 12 families of 500 step paths each characterized by a given value of standard variation σ ranging between 0.1 and 1.2 radians, of the distribution of changes of direction between successive steps and PLOT it in Mathematica? I don’t know anything about Mathematica specially how to write the code for this problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:13:59+00:00Added an answer on May 22, 2026 at 8:13 pm

    Following your notations in the question, you use independent normal increments to build an angle, and then use it as a direction for next step of size size.

    Block[{size=0.5}, Graphics[
     Line[Accumulate[
       Function[x, size*{Re[x], Im[x]}, Listable][
        Exp[I Accumulate[
           RandomVariate[NormalDistribution[0, Pi/4], 10^3]]]]]]
     ]]
    

    enter image description here


    EDIT: This is a response to G. Xara’s request to visualize random walk on Robinson’s projection of a sphere.

    RandomRobinsonWalk[coords_List] := 
     Show[CountryData["World", {"Shape", "Robinson"}], 
      Graphics[{Thick, Red, 
        Line[Map[ GeoGridPosition[ GeoPosition[#], "Robinson"][[1]] & , 
          coords]]}], Frame -> True]
    

    Generation of random walk on a sphere is performed as follows:

    Coordinates[{\[Theta]_, \[Phi]_}, {cosa_, 
        sina_}, \[CapitalDelta]\[Theta]_] := {ArcCos[
        Cos[\[CapitalDelta]\[Theta]] Cos[\[Theta]] - 
         cosa Sin[\[CapitalDelta]\[Theta]] Sin[\[Theta]]], 
       ArcTan[cosa Cos[\[Theta]] Cos[\[Phi]] Sin[\[CapitalDelta]\[Theta]] \
    + Cos[\[CapitalDelta]\[Theta]] Cos[\[Phi]] Sin[\[Theta]] + 
         sina Sin[\[CapitalDelta]\[Theta]] Sin[\[Phi]], (cosa \
    Cos[\[Theta]] Sin[\[CapitalDelta]\[Theta]] + 
            Cos[\[CapitalDelta]\[Theta]] Sin[\[Theta]]) Sin[\[Phi]] - 
         Cos[\[Phi]] sina Sin[\[CapitalDelta]\[Theta]]]};
    
    Clear[SphereRandomWalk];
    SphereRandomWalk[ipos_, steps_, stepsize_, prec_: MachinePrecision] :=
     FoldList[Function[{up, cossin}, Coordinates[up, cossin, stepsize]], 
      ipos, Function[u, {Re[u], Im[u]}, Listable][
       Exp[I RandomVariate[UniformDistribution[{-Pi, Pi}], steps]]]]
    

    The formula used to obtain the next {\[Theta], \[Phi} pair was obtained as follows:

    Expand[Simplify[((RotationMatrix[\[Alpha], {Sin[\[Theta]] Sin[\[Phi]],
              Sin[\[Theta]] Cos[\[Phi]], 
             Cos[\[Theta]]}].({Sin[\[Theta]] Sin[\[Phi]], 
              Sin[\[Theta]] Cos[\[Phi]], 
              Cos[\[Theta]]} /. {\[Theta] -> \[Theta] + \[CapitalDelta]\
    \[Theta]}))) /. {Conjugate -> Identity} /. {Abs[x_]^2 :> x^2}]]
    

    that is, perform a fixed size rotation in [Theta] and then rotate around the previous vector by random angle \[Alpha].

    Usage:

    ((# - {90, 0}) & /@ (SphereRandomWalk[{Pi/2, 0} // N, 2500, Pi*0.01]/
         Degree)) // RandomRobinsonWalk
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a couple of images, representing tents, that look like this: The red
Two tables are given PilotGroup Table Pilot Plane Jon Smith A1-Fighter Jon Smith B1-Fighter
lets say i have two points A & B in my 3D Space now
I am making an iphone app that uses two fingers to place and scale
For a 3D game engine I'm working on I need to calculate if two
I develop a website with CMS WordPress. I don't have any errors on my
How to find intersections between two (or more) 3D planar polygons (for the simplest
I am trying to place two divs next to each-other on the same line,
Is there a button in ExtJS with increment/decrement feature (something like that )? I
I have two publish profiles defined for my project in Visual Studio 2010: one

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.