# Solving Geoscience questions using Julia:

**URL:** <https://discourse.julialang.org/t/solving-geoscience-questions-using-julia/119262>\
**Category:** Geo\
**Tags:** question\
**Created:** [September 10, 2024, 10:29pm UTC](https://discourse.julialang.org/t/solving-geoscience-questions-using-julia/119262 "2024-09-10T22:29:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeodeticR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/geodeticr/32/218661_2.png) [@GeodeticR](https://discourse.julialang.org/u/GeodeticR)\
**Post date:** [September 10, 2024, 10:29pm UTC](https://discourse.julialang.org/t/solving-geoscience-questions-using-julia/119262/1 "2024-09-10T22:29:03Z")

</div>

Okay, so, I’m trying to become proficient at using Julia for various applications and not just cleaning and crunching datasets.

One of my graduate classes assigned a few problems that we can do by hand, but we are also encouraged to do them in a programming language of our choice if feasible.

Which brings me to my question (I’m not looking for solutions - rather guidance on how to get started and which packages would be useful for tackling the problems):

First question is:

> Three ridges A, B, and C meet at a triple junction. Ridge ‘A’ has has a strike of 329-degrees (N31W) and a spreading rate of `7.0 cm yr^-1`; ridge ‘B’ strikes at 233-degrees (S53W) and has a spreading rate of `5.0 cm yr^-1`. Determine the strike of ridge ‘C’ and its spreading rate.

I know it would be easy to just draw out these lines on paper and trig it out by hand, but where is the fun in that?? I think it would be a good learning experience to see if I could at least create a diagram using Julia and annotate it that way.

Does anyone have any insight to how I might start diagramming this out in Julia or any of the Julia packages? I was looking into `Meshes.jl` or `GeoStats.jl` but I think that’s for more advanced usage.

Any input is appreciated!

- Rob

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [September 10, 2024, 11:41pm UTC](https://discourse.julialang.org/t/solving-geoscience-questions-using-julia/119262/2 "2024-09-10T23:41:34Z")

</div>

So you know that

Vab + Vbc + Vca = 0

Pick a package that plots vectors and

- Draw vector Vab (known)
- Draw vector Vbc (known) at the end of Vab

The vector starting at the end of Vbc above and ending at the start of Vab is your solution.

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [September 11, 2024, 9:08am UTC](https://discourse.julialang.org/t/solving-geoscience-questions-using-julia/119262/3 "2024-09-11T09:08:33Z")

</div>

@GeodeticR I would start by picking the geometry types that approximate the ridges for your purposes. You can consider simple 2D `Box`es and then use `Scale` and `Rotate` to place them in the right place.

At the end you can call \angle between points, vectors or rays to get the angle of interest.
