-> the red are planes at current position (simpified)
and i want to find out how far i have to move them on the z axis for them to create a surface where the planes are the tangent line on that point of the curve

if anybody has an idea I would greatly appriciate the help

See this concept/algorithm.
(Iâ€™m not a mathematician or suchâ€¦ take everything i say/post as an option from a hobbyist)

What you have are derivative values, to rebuild you need to do the integral of those values.

I interpolated point locations and vectors (with catmull interpolation).
With mass addition > partial result, every point is moved in Y for the sum of all previous point/vector.
Number of samples is highly relevant.

integral.gh (19.5 KB)
Point spacing is even, maybe with an uneven spacing it give wrong results (or wronger).
I donâ€™t know if this is correct, this is very likely do be doable by pure math very better. (sorry for my english)

You didnâ€™t attach you data, so i created this to try the concept.

You have many vertical planes (near flat/horizontal planes!)â€¦ an analogue 3d version of this algorithm wonâ€™t work.

it does exactly what i need for the simple version with just some vectors in 2d

do you have a suggestion on how to go about it in 3d when the planes are scattered about and not in some kind of grid?
I am new to GH and not sure if there is a simple adaption from what you showed to the 3d surface

I was thinking about it â€¦ somehow.
A first â€śtranslationâ€ť that came in my mind would require a 4-dimensional space environment â€¦ (as said, iâ€™m not a math proâ€¦ â€śsimpleâ€ť situation > stupid solutions).

The first step would be to interpolate through your samples, â€śsubsamplingâ€ť, making a more dense (increased number of samples) but equally spaced grid.
I would do 2 surface with â€śpatch surfaceâ€ť, one for XZ curvatures/tangentvectorangle and another for YZâ€¦ smoothing the Z values.
But Iâ€™m not sure if â€śsplittingâ€ť the curvatures into 2 â€śderivative graphsâ€ť would broke the total smoothness.
(hence why an ideal solution â€śwould beâ€ť a 4-D derivative graph")

I donâ€™t know.
Maybe iâ€™m completely off road, googling the right keywords might lead us to proper solutionâ€¦ but i donâ€™t know what to search for.
Iâ€™m just writing what I have in mindâ€¦ madness atm.

What you have are samples of a possible â€śnormal mapâ€ť
1st result googling â€śreconstruct from normal mapâ€ť:

Beware:
Your calculations are done (probably) using distance as your â€ślensâ€ť is flat, like a fresnel lens.
After you have your first shape, you will likely need to re-iterate through it doing again your math but with new distances (some parts of the lens are nearer the object and further from projection panel and vice-versa), and so the ray angles will change a bit (becoming more precise).
Or, you know, find a direct math calculation.

This solution can somehow â€śinterpolateâ€ť through uneven located 3d-vectors.
Itâ€™s heavy and very likely imprecise and wrong, probably wasted time.
You need a math expert to do what you need.

Anyway, in my solution i make 3 patch surface through 3 different sets of points.
Each set is made by moving in Z the sample point by the component of its vector (X, Y, Z â€¦ hence 3 sets)
Then intersecting the surfaces with a grid of rays and reconstructing the vectors to have the even field.

(inside is a c# to extend surfaces and a c# to convert vector to normal color)

How to do the next step, from vector to 3d shape, is still a mystery to me.
(but, as said, the first step is already â€śfakeâ€ťâ€¦ soâ€¦)

I re-quote myself:
â€śYour calculations are done (probably) using distance as your â€ślensâ€ť is flat, like a fresnel lens.
After you have your first shape, you will likely need to re-iterate through it doing again your math but with new distances (some parts of the lens are nearer the object and further from projection panel and vice-versa), and so the ray angles will change a bit (becoming more precise)â€¦â€ť

I like challenges, indeed.
But Iâ€™m missing knowledge (as always), and the empiric methods I use not always get to a result.

(another thing, the Olympic logo in your sources have creases dividing the colors; those are like different lens shapes joined togetherâ€¦ what are we doing here is just 1 lens. Your refraction lens will not have â€ścreasesâ€ťâ€¦ or, it could have them, but with a very high sample resolutionâ€¦ which is madness!)

ah now I understand what you ment. sorry I didnâ€™t quite get that

with

I didnâ€™t mean you but me and not giving up on my goal ^^

yeah I know

One of my friends is a math student. I will try and see if he can make time for me. If he does and I get to a â€śsolutionâ€ť or rather a approximation that works close enough, I will post it here for anyone who is interested

Interpolation between points was unreliable (patch would take unpredictable shapes)
Needing another method to â€śinterpolateâ€ť between a set of 2D-random-placed values, I switched to using mesh-spray functions.

I try to describe now shortly the process:

I created a set of points (flat, Z=0) , each with its normal vector. In the script I used a semi-sphere as a source.

Done delaunay mesh from those points + some far point to get a large, extended mesh

Converted normal vectors to normal colors and colored the mesh with spray points

evaluated the mesh with a high-resolution grid of samples to get an even distributed matrix of color samples

converted color to vector back again

From now on the method is likely to be inaccurate/wrong/incomplete
(or maybe iâ€™m just lacking enough resolution, the 2D version was fine ONLY with very high resolution)

we have a matrix of vector samples to use for moving the matrix of point

for each row, starting from first point (still), calculated final Z for each element as the sum of the â€śsteepâ€ť (tangency) of all previous element

same for each column

for each point in the matrix, done the average (of Zs) from row and column results

Hi
I wouldnâ€™t call the result meh
To be honest this is better than anything I even got too (by far )

Maybe not the 100% correct way mathematically, but I think that you have had to study math to be able to complete solve this issue

I will try this solution tomorrow (from front to back -> taking an image sampling it to define where light rays need to go and calculating vektors | then your script) and then render a caustic image from the generated geometry and see how it looks. Will post image here

hi
sorry it took me for ever to get back to you.
well better late than never
I tried it with one of my results of planes and plane normals. As you expected the result are by far not as good as what you got with your sphere example. but there you had one continous motion of vektors and not a wild something like me now
here is what it looks like when i try inputting my planes:

i moved each plane on the zaxis to match up with its neighbor on a row by row basis. and then reoriented the the plane to still have the correct refraction of light.
also still not the results i was going for, but ^^ Donâ€™t really want to give up