Node Wish List
 1-16  …  177-196  197-216  217-236  237-256  257-276  …  417-425

Previous
Next
 From:  wayne hill (WAYNEHILL5202)
9581.217 
New qhull3d Node:

Based on the qhull library:
https://github.com/bjnortier/qhull
http://www.qhull.org/

I would like to thank James for helping out with testing.

Save all the files to this directory:
C:\Users\<UserName>\AppData\Roaming\Moi\nodeeditor\nodes\extensions


Input:
1. Points: At least three points to start the node.

Outputs:
1. Triangles: Line edge vectors to create planar faces.
2. Hull Pts: The outer most points of a point cloud being input.
3: Hull Pts Objects: The outer most object points of a point cloud being input.

Added a new Vector3d.js point class function for future projects.

Wayne



EDITED: 17 Jan 2021 by WAYNEHILL5202

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
9581.218 
What is the the name of a "qhull" : a polyhedron ?
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  wayne hill (WAYNEHILL5202)
9581.219 In reply to 9581.218 
Qhull computes the convex hull from points.

https://en.wikipedia.org/wiki/Convex_hull

The attached image is a simple point cloud. Red spheres are the outer-most points of the cloud making up the hull. The lines are the triangles that make up the outer-most planes of the hull.

EDITED: 17 Jan 2021 by WAYNEHILL5202

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9581.220 In reply to 9581.217 
WOW,
I dabbled a few years ago, but gave up.
Brian

Now to try it with spherePts...
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9581.221 In reply to 9581.217 
This link explains, in simple terms, the difference between static methods and instance methods,
in particular for a vector class. Its examples with PVector (from processing), essentially show how to use the Vector3d.js class. (FALSE)

https://www.khanacademy.org/computing/computer-programming/programming-natural-simulations/programming-vectors/a/static-functions-vs-instance-methods

- Brian

Note, after much confusion, the PVector examples are different from the way Vector3d is written.
So this post should be disregarded. The classes can be written in different, conflicting ways.

EDITED: 12 Jan 2021 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  wayne hill (WAYNEHILL5202)
9581.222 In reply to 9581.221 
Brian,

Thank you! Max uses the Vector class on his Subdivide and the Cloth script. It was used on the original qhull source code.

Wayne
.-- .- -.-- -. .
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9581.223 In reply to 9581.222 
Thank you Wayne.
I'll look at those other programs.
I have been puzzling over how to do add-on libraries, and how they are "linked", or accessed.
There seems to be multiple ways to write code.
It seems like nodeeditor/Javascript scans all the addons.
Would having ES6, (or ES11?), be of any benefit?

-Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  wayne hill (WAYNEHILL5202)
9581.224 In reply to 9581.223 
Brian,

MoI's WebKit interface determines what resources are available for the Node Editor uses to ensure stability. My Javascript version is 1.7. ES6 or ES11 would more likely be on a different environment like a backend server Node box. The Node Editor startup scans the scripts and begins the background services. The scripts are scanned and linked in their filename order.

loadScripts('core', 'lang, compatibility, colors, geometry, main, editor');
loadScripts('nodes', 'macros, basic, logic, points, curves, solids, construct, transform, objects, interface');
loadScripts('nodes/extensions/libs', '*');
loadScripts('nodes/extensions', '*');
loadScripts('core', 'init, ext.*');

If you want to build a library calling other Javascript files, they have to be scanned (note filename order) before they are available for the other libraries to use.

Example directory:
1test.js
2test.js
3test.js (uses 1test.js and 2test.js and 4test.js)
4test.js

3test.js can use 1test.js and 2test.js libraries but not 4test.js library because it has not been scanned. Error will trigger on a missing script. It is not missing.

4test.js will have to be renamed to 0test.js in both 3test.js and it's filename.

New listing:
0test.js
1test.js
2test.js
3test.js (uses 1test.js and 2test.js and 0test.js)


Wayne
.-- .- -.-- -. .
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9581.225 In reply to 9581.224 
Thank you Wayne.
It is very useful information.
- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Message 9581.226 deleted 12 Jan 2021 by BEMFARMER

Previous
Next
 From:  bemfarmer
9581.227 In reply to 9581.221 
Note, I edited the post on PVector, because it works differently from Vector3d.
It almost works in the opposite way, which caused much confusion.
If object types do not match, javascript shows an error.
The way a class is programmed determines the way it works.
Other programmers have written vector classes, and complex number classes, with instance methods, and static methods, which behave very differently from what other programmers have written. I am not aware of any standard.

So I have been doing my own complex number class, cPlex, adapting the available conflicting code.
It has to be ES5 compatible as well, to be compatible with the javascript used by MoI4.
(A complex number class is very similar to a vector2d class.)
(mathJS has the needed functions, but is extremely complicated, ES11(+/-), BigInt, etc.
Then I can finish my script.

- Brian

Mixing real numbers with complex numbers makes it even more complicated.

EDITED: 12 Jan 2021 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  wayne hill (WAYNEHILL5202)
9581.228 In reply to 9581.227 
Brian,

Learning both Javascript and Node Editor programming is confusing and complicated. Javascript code would work on the web browsers, but not in the Node Editor environment. That is when the version type the Node Editor uses make a difference. The scripting format of the Node Editor is very different from Javascript code. My Delaunay conversion script project changed a higher version of Javascript to a lower version to be compatible with the Node Editor. The Vector3D.js is a compilation of code from different sources. There are no documented standards to reference from for Node Editor programming. Learning from other users code, including your examples.

Wayne
.-- .- -.-- -. .
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9581.229 In reply to 9581.228 
Thank you Wayne, for the clarifications.
I see that Max initiated a vector, before making the vector equal a vector subtraction.

Arrays and objecLists get initiated before use...

Now have a better understanding of why objects do not match, in my test code.

- Brian

EDITED: 13 Jan 2021 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Psygorn (DRILLBIT)
9581.230 In reply to 9581.217 
Where can I find the qhull3d.nod?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9581.231 In reply to 9581.230 
qhull3d node seems to have been deleted(?)
Not yet integrated into Nodeeditor1.1.zip(?)
Will be located in the Objects2 menu.
(Place node in the nodeeditor extensions folder.)
Attachments:

Image Attachments:
Size: 30.7 KB, Downloaded: 34 times, Dimensions: 359x227px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Psygorn (DRILLBIT)
9581.232 In reply to 9581.231 
Thank you bemfarmer :-)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Psygorn (DRILLBIT)
9581.233 In reply to 9581.171 
Where is "ExtendSrf.js" to be found?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  WN
9581.234 In reply to 9581.233 
Hi Psygorn.
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Psygorn (DRILLBIT)
9581.235 In reply to 9581.234 
Hi WN,

Thank you.

I cannot find "Loft2.js" as well. Where can I find it?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9581.236 In reply to 9581.235 
Maybe try a search for +mLoft2 ?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
Show messages:  1-16  …  157-176  177-196  197-216  217-236  237-256  257-276  277-296  …  417-425