# SCR Streamline Animation Code

## 1. Finding Adjacent List

Note that most of the cases can run correctly in this step, but there has some possibly discover cases will cause the error of finding adjacent list:

**i. Shorthest Streamlines in the frames**&#x20;

The short streamlines in the frames may cause the adjacent list order not correct.&#x20;

Since the algorithms will miss-matched the shortest Euclidean distance point.

![](/files/-MhmBvwQ1td_N_gJHfLL)

**Current Solution:**  Remove the shortest streamlines manually before finding adjacent list.

**Possible Future Solution:**  Add more sampling point on the current streamlines when finding adjacent.

**ii. Streamlines slope angle is nearly 45**

Streamline of the angle nearly 45 will hard to determine this streamlines is vertical or horizontal, and cause the adjacent order wrong.

![](/files/-MhmDJ6HEnJOv5IJhGIx)

**Current Solution:**  Reverse the adjacent order of current streamline when the loop streamlines occurs.

**Possible Future Solution:**  No idea yet.

**Note:** User are able to manually modification the adjacent list by edit the Config file if wrong adjacent list calculate occurs.

## **2**. Streamline Corresponding Problem

**i. Crossing and Reverse Issues**

For the crossing problem, this is cause by the patch of 2 keyframe position is time-varying.

For the reverse problem, this is cause by the streamlines generation points order. Sometime the streamlines point order is upside down.

![Example of Crossing and Reverse Issues GIF](/files/-MhmHR1uXo4BciyKNyMl)

**Current Solution:** Modified the Config File or Adjust the Streamlines position inside Vpaint

**Possible Future Solution:**&#x20;

&#x20; 1\. Add the constraint of cannot crossing adjacent list

&#x20; 2\. Determine if the head and tail of the sample points is in reverse position.

## 3. Insertion Streamlines

**i. Boundary Streamlines**

if the current unmatched streamlines is include the boundary streamlines, which means it is unable to interpolation and insert a new streamlines into 2 adjacent streamlines. The program will crash in this condition.

**Possible Future Solution:**&#x20;

&#x20; 1\. Extrapolation the boundary streamlines

&#x20; 2\. Don't remove the boundary streamlines

## 4. Streamlines Respacing

**(some un-implement yet code)**

* The iteration parameters in the ui panel is not yet set-up.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yayapipi.gitbook.io/hypnotic-streamlines-animation/limitation-and-bug/scr-streamline-animation-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
