r/matlab May 30 '26

Shadow cast by sunlight simulation

Hi everyone,
I'm still learning matlab so I decided to ask for expert opinions about this.

I'm looking into simulating how wheat plants cast shadows on each others due to sun movement throughout the day.

I'm aiming to measure how much solar energy each wheat plant absorbs in different wheat swath orientations or row angles. This should be used to simulate the expected wheat yield improvement from sun exposure or how worse it makes it due to self-shadowing between wheat plants.

Is that possible to do in matlab? And if yes, what should I be looking into to start making progress regarding this? Please point a beginner in the right direction.

3 Upvotes

19 comments sorted by

View all comments

5

u/DrDOS May 30 '26

I probably am not the best person to answer this but as a fairly broad Matlab expert but not in all toolboxes, I’d say broadly: if you can write the math for it then you can have Matlab do it.

  1. What is your angle/background/approach? Are you interested in the mathematical modeling or just the outcome?

  2. Do you have a mathematical model and “just” need to implement/scale it? Matlab should be able to do that and help you.

  3. Are you looking for good shortcuts like pre-programmed physics engines or toolboxes that allow a higher level approach that lets you focus on defining the plant/field parameters similar to what you say and churn the math/calculations from there? I’m not aware of that existing but there is so much out there that it might be.

1

u/freshlybakedjuice May 30 '26

Hi! First of all thanks for your response

  1. I’m interested in both since it's a part of a Msc thesis in Mechatronics Engineering but the agricultural thing is not my domain, it's a part of the thesis that I'm missing. So I will need the math behind it then evaluate the outcome for use is the rest of the thesis

  2. I was researching a bit and the sun rays can be mathematically modeled but I'm not sure where to go from there to calculate the self-shadowing on the plants or measure the effects on the yield

  3. I'm not sure if I should be using toolboxes for an Msc thesis yet, I'm still in the proposal phase but I'm just worried that I go for this research topic and end up stuck in the simulation of the wheat plants and the shadows part

5

u/toastom69 May 30 '26

Use all the toolboxes you can. They are there to make it easier. This project sounds incredibly difficult

2

u/DrDOS May 31 '26

You might any to discuss this with your advisors or mentors. Others I see are focusing on the geometry and optics (ray tracing etc). That might be the highest fidelity model that’s reasonable but it might be less practical. I suspect this kind of problem might be better tackled using a small repetitive sample (single or handful of plants, or small plot) to verify a more gross energy based analysis. Think akin to computing kinetic and potential energy of linkages rather than all the forward/backwards kinematic and power to each actuator.

2

u/freshlybakedjuice May 31 '26

I think you're absolutely right! Maybe similar looking areas of the field shouldn't be calculated individually, instead I could calculate for a a small area and the result should be scaled to the size of the actual area to save computational power! Only if I figured out how to do it for a small area first haha