# Can i do this using the fourier transform?

This topic is 1278 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi,

i'm working on a mesh preprocessing tool and have the idea to calculate neighbourhood information for each vertex to detect things like edge flow, convex / concave regions etc.

E. g. to sum up neighbouring convexity of polygons i'd project their center to the vertex normal plane to get 3 values:

Angle (representing position to vertex), polygon area / distance relation (=weight) and polygon convexity (=value).

To sum this up using a 1D FT, and looking at the attached picture, the black dot represents a single polygon, one times with large area (red) or with small area (blue).

Is there a way to add such a sample to a FT for each polygon, one after another?

Actually my solution would be: Don't use FT at all and do this using a simple 1D array without any cool math.

But if this is a common problem with an elegant solution please let me know - my math background is so weak i don't know what search terms to use :)

##### Share on other sites

I'm unsure on what you're trying to accomplish. Can you provide a more detailed and concrete example?

##### Share on other sites

Hmmm... ignoring the mesh example, let's say the usual usage of a fourier transorm is to encode a signal.

In case of sampling some square wave over a period of 8 samples those numbers would look like [7,7,0,0,0,0,7,7], or with indices [0:7, 1:7, 2:0, 3:0 ...

For this example it is easy to calculate a FT to fit this data.

But in my case the data is more loose. If i have 2 samples i want to inject, (position 0.5, value 6) and (position 4, value 5) the signal data could be created like this:

[3,3,0,0,5,0,0,0], when using position as index and value for the number.

Now, assumng the second sample has an additional weight (or width) of 2, and the first sample has only a weight of 0.5, tha data would look somehow like:

[1.5, 1.5, 0, 2.5, 5, 2.5, 0,0]

The second sample becomes 'wider' in data but not higher.

The first sample can't become 'narrower' because of small sampling rate, so it have to become lower to represent th orignal data as good as possible.

Now i'd like a mathematical tool to do this without the 'snapping to 8 sample positions' problem.

Actually spherical harmonics seem closer to what i want than fourier transforms.

With spherical harmonics you can add directional samples with various length one after another, and afterwards 'dot' a unit vector with it to see how's the value in that direction.

Spherical harmonics have two properties of the three i need: direction and length (accordingly to angle and value).

But they still miss the weight (or width) property, this depends on how much bands you use: less bans, 'wider' lobes.

Unfortunately i do not understand spherical harmonics well enough to translate it from 3D unit sphere to one dimension, but it would be a good start.

##### Share on other sites
What you probably want is called Fourier series, which you can think of as "circular harmonics". I don't have the time now to write an introduction to the subject for you, but perhaps you can learn about it somewhere online.

##### Share on other sites

What periodic signal or function are you trying to interpolate or resample in a mesh processing tool? Vertices, edges and faces are discrete; even if you want to subdivide the mesh the appropriate techniques involve interpolation schemes from a local neighbourhood of vertices, with no concern for symmetry.

##### Share on other sites

Yes, actually i use the simple array and for each neighbouring mesh feature i sum up signals like in the drawing from first post (one feature may cover more than one array elements).

The result is ok, see the screenshot where each vertex has an 'idea' how the red map behaves in all directions for a given radius.

Because the input comes not in regular intervals, in need to sample data to a array first, and fourier is pointless - i could use it to store the data, but except for compression i see no advantage.

Fourier transform is good to store signals, but too hard to create signals - at least for me.

I also tried Spherical Harmonices in 1D. This would work even if i have no control over lobe width of a single sample because there are always enough input samples spread over all directions in practice. It is not as accurate as the size 64 array, even with 8 bands.

So there is a big differnce between FT and SH, because the different basis functions.

However - at the moment i'm happy with the array. It works and i can see if it helps to solve my problems.

But i still think there must be a better way to do it.

1. 1
2. 2
Rutin
18
3. 3
4. 4
5. 5

• 9
• 14
• 9
• 9
• 9
• ### Forum Statistics

• Total Topics
632922
• Total Posts
3009218
• ### Who's Online (See full list)

There are no registered users currently online

×