Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411500 Posts in 69373 Topics- by 58428 Members - Latest Member: shelton786

April 25, 2024, 12:26:29 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)interval issues
Pages: [1]
Print
Author Topic: interval issues  (Read 4381 times)
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« on: March 24, 2023, 11:03:28 AM »

Basically
- B represent the ray interval along the minor axis trick. That is I wrapped vertically, with horizontal representing the axis of the largest component, aka the shallowest slope.
- S represent the recurring grid interval.

SO turning this into a 1d problem I have:

- Range B > Range S
- B = offset + kS + (S/d)
- rn = S-(S/dn-1)
- offsetn = rn-1

- offset0 = 0


I'm trying to determine occurrences as the interval drift relative to each other. At 0 they start at the same, but end with a slight difference, which is compounded at each respective recurrence, until they eventually sync back, if they ever do.

- k is the number of time S repeat within B, so basically B/S as an integer division.
- S/d = the fragment of S needed to add to kS to reach size of B, that at time 0 B = kS + (S/d)
- r is the reminder of B - (k+1)S, and basically the start of a new recurrence offset.

I need to predict offsetn and (S/dn), let's call the later dsn, and I cannot guarantee than k is fixed for all n.

Now things looks funny, is that offsetn and dsn are dependent on the previous state of each others. Worse there seems to be funny behavior depending on whether ds is above or below 0.5.

I'm not good enough about math to recognize a pattern, or known conjoncture or anything.
Logged

Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #1 on: March 24, 2023, 02:10:44 PM »

Feedback: I don't understand your problem, and your post is missing an actionable question
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #2 on: March 24, 2023, 02:56:24 PM »

Quote
I need to predict offsetn and (S/dn), let's call the later dsn, and I cannot guarantee than k is fixed for all n.

I mostly need to predict offset n (probably?)

I feel like the math part should speak for itself, so I don't know how to present it better. If I give more context, people get hung up on the extra details I don't want or need to solve.

But basically it's for a kind of raytracing in wrapping space, with a lot of extra abstraction leap to get to that specific point. With the extra requirement to avoid for loop at all cost for a fixed length solution, non negotiable.

If you really want the extra details, here is a recount of my journey to here:
https://forum.unity.com/threads/infinite-parallax-hair-volume-using-wrapping-grid-tracing-attempt.593233/
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #3 on: March 25, 2023, 04:09:07 AM »

How can I predict the values of offsetn and dsn, where dsn represents (S/dn), given the parameters B, S, and k, and the constraint that k may not be fixed for all n? How does the relationship between offsetn and dsn change based on the value of ds, and what patterns or known conjectures might help me better understand this behavior?
Logged

Dany0
TIGBaby
*


View Profile
« Reply #4 on: February 11, 2024, 08:00:20 AM »

Looks like you've been taking a crack at it for quite a while. Unfortunately I don't think you can avoid the computational complexity of what you're trying to achieve. My intuition tells me that you're trying to "trick" your way into displaying information you don't have. It'd be easier to fake it, but I'm not sure how. Have you considered writing a university professor?

Alright I took a very brief crack at it as I don't have much time, am I getting this right? I'll try to translate my paper notes here

You start with offset_0 = 0.
The recurrence relation for offset_n is given by: (offset_n = r_{n-1}), where (r_{n-1}) is the remainder of (B - (k+1)S) at time (n-1).

Recurrence Relation for d_sn: You want to predict the value of d_sn (i.e., (S/d_n)).
At time 0, you have: (B = kS + (S/d_0)).
Rearranging, we get: ((S/d_0) = B - kS).
Therefore, (d_0 = S/(B - kS)).

General Recurrence for d_sn: For subsequent time steps, you can use the recurrence relation: (d_n = S/(B - kS + offset_n)).
Predicting offset_n: To predict offset_n, you need to calculate the remainder (r_n) at each time step.
The recurrence relation for (r_n) is: (r_n = S - (S/d_{n-1})).
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic