VEX: I need to cluster some point islands, cluster center...
1395 4 0- Masoud
- Member
- 407 posts
- Joined: Aug. 2015
- Offline
Hello guys,
As you can see in the image below, in a bunch of points islands, I need these things, using VEX:
1) I want to apply random color to each point island (cluster).
2) I want to group each cluster’s (averaged) center points.
I tried several ways without success
I would appreciate any ideas.
Thanks for helping.
As you can see in the image below, in a bunch of points islands, I need these things, using VEX:
1) I want to apply random color to each point island (cluster).
2) I want to group each cluster’s (averaged) center points.
I tried several ways without success
I would appreciate any ideas.
Thanks for helping.
Masoud Saadatmand (MSDVFX)
- Konstantin Magnus
- Member
- 670 posts
- Joined: Sept. 2013
- Offline
Hi Masoud, here's a non-VEX way to get started.
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
- Konstantin Magnus
- Member
- 670 posts
- Joined: Sept. 2013
- Offline
Grouping centers:
Clustering with VEX:
https://forums.odforce.net/topic/27536-jurajs-playground/?do=findComment&comment=176232 [forums.odforce.net]
float radius = chf('radius'); int pts_max = chi('max_points'); int handle = pcopen(0, 'P', v@P, radius, pts_max); vector pos = pcfilter(handle, 'P'); float var = length(v@P - pos); i@group_center = var < chf('threshold');
Clustering with VEX:
https://forums.odforce.net/topic/27536-jurajs-playground/?do=findComment&comment=176232 [forums.odforce.net]
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
- Masoud
- Member
- 407 posts
- Joined: Aug. 2015
- Offline
- Konstantin Magnus
- Member
- 670 posts
- Joined: Sept. 2013
- Offline
The file in the odforce post does set cluster attributes.
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
-
- Quick Links