MoI discussion forum
MoI discussion forum

Full Version: Parametric design in MoI?

Show messages:  1-14  …  455-474  475-494  495-514  515-534  535-554  555-574  575-594  …  895-912

From: bemfarmer
13 Oct 2016   [#515] In reply to [#514]
Thank you Chippwalters.

Stackedit looks powerful, but the install with yum, bower, npm, gulp, ... is very confusing, as I've never done such before.

- Brian
From: speedy (AL2000)
13 Oct 2016   [#516] In reply to [#515]
Hello Friends
another little example to share with you;

Karsten, I have loaded your Node ... congratulations
Just a question...
Can I put them in the Node editor with the original Max's Node
v.085?
Many thanks for your response
best
al

Attachments:
CP-Cosine Arrangement.nod

Image Attachments:
Cosine Arrangement.jpg  Cosine Arrangement2.jpg 


From: mkdm
13 Oct 2016   [#517] In reply to [#516]
Hi speedy (AL2000),

What a fantastic job!

One further step to Jewelry Design in Moi!

Thanks,

- Marco (mkdm)
From: Karsten (KMRQUS)
13 Oct 2016   [#518] In reply to [#516]
Hello Al,
I always try not to touch Max original code, only for some experiments. Nodes are normally additions, to purpose functionallity.
Have a nice day
Karsten
From: chippwalters
13 Oct 2016   [#519] In reply to [#515]
Hi Brian,

Not sure I understand. I just use it in the Chrome browser window. No need to download any app.
From: James (JFH)
15 Oct 2016   [#520] In reply to [#517]
Hi Marco,

I tried to install your PatternSelectArray node into new version of node editor without success.
The problem seems to be that there is a conflict with existing function "pointArray.prototype.getElement".
I tried renaming it, but still no luck.

Have you rewritten node for v0.85?

One suggestion I think would be useful is for node input to accept number series (disregarding commas).
In that way for example a random pattern could be generated: range/random/interp/PatternSelectArray.
Also inputs may, in later development, be generated by boolean (True/false) queries with outputs of ones & zeros.
Just a thought!

Thanks,
-James
From: mkdm
15 Oct 2016   [#521] In reply to [#520]
Hi James,

and thanks for your reply and suggestions. Much appreciated!

Right now, regarding the rewriting of the Array utility nodes that I was writing some time ago,
I decided to wait the next official stable release of Project Elephant.

Best,

- Marco (mkdm)
From: Karsten (KMRQUS)
16 Oct 2016   [#522] In reply to [#520]
Hello James,

to run PatternSelArray in V0.85 please replace the following:

source_elem.pt.x,
source_elem.pt.y,
source_elem.pt.z,
source_elem.AngleX,
source_elem.AngleY,
source_elem.AngleZ,
source_elem.Size

With:
source_elem.data[0],
source_elem.data[1],
source_elem.data[2],
source_elem.data[3],
source_elem.data[4],
source_elem.data[5],
source_elem.data[6]

at two places in the file! It seems that Max has changed the internal structure since the Node was created!

Have a nice day
Karsten
From: James (JFH)
16 Oct 2016   [#523] In reply to [#522]
Hi Karsten,

Thanks for that, it works!
Now if only we could input array to dynamically generate the pattern.

I recall you stating that you were not a "Pattern Man" [#319]
http://moi3d.com/forum/lmessages.php?webtag=MOI&msg=7713.319

IMHO the manipulation of num & pt arrays (interlacing, flipping shifting etc)
lies at the very heart of parametric design. i.e. pattern.

Anyway, thanks again
- James
From: mkdm
17 Oct 2016   [#524] In reply to [#522]
Hi Karsten,

Thanks a lot for updating PatternSelArray for V0.85. I hope it works.

Have a nice day,

- Marco (mkdm)
From: mkdm
17 Oct 2016   [#525] In reply to [#523]
Hi James and good morning to everyone,

> IMHO the manipulation of num & pt arrays (interlacing, flipping shifting etc) lies at the very heart of parametric design. i.e. pattern.

I totally agree with you.

In fact, as I wrote in a post some times ago (http://moi3d.com/forum/index.php?webtag=MOI&msg=7713.353),
I was writing a bunch of utility nodes for PointArray datatype :

- "ArrayShuffler" : returns a PointArray, by shuffling the elements inside the input PointArray (RMB -> Update : generate a new random shuffle)
For example, it may be useful to create objects like ball of wool.

- "ArrayFlipper" : returns a PointArray, created by flipping the elements of the input PointArray

And "ArrayBoolean", a very useful node that operates boolean operations on Pointarray. Very powerful.

Unfortunately, because of a distraction, I totally lost all the code of "ArrayBoolean" and other two very interesting nodes I was writing !!!

Only ArrayShuffler and ArrayFlipper were saved.

When Max will release the first 1.0 official version of Project Elephant I will try to write again those nodes.

Best,

- Marco (mkdm)
From: James (JFH)
17 Oct 2016   [#526] In reply to [#525]
Hi Marco,

"ArrayBoolean" sounds interesting. What a shame it has been lost.
Hopefully it or something similar will be resurrected in the future.
I'm always excited by your node contributions.

-James
From: mkdm
17 Oct 2016   [#527] In reply to [#526]
Hi everyone,

Thanks a lot James for your appreciation.

Damn "recycle bin" and "overwrite" !!
I tried also to use some recovery tools but without success...it's been too long....

Anyway, here's just some info in the case of someone wants to write something similar.

I was writing these nodes :

code:
"ArrayDistinct" node :

Input : A PointArray[], a DELTA (a javascript float number) and a PRECISION (a javascript int number) 

Output : a new PointArray[] containing all the "DISTINCT" PointArray elements found in the source PointArray[].

All the PointArray elements of the source, far from each other, NOT MORE THAN DELTA (considering the required PRECISION)
are WELDED into a SINGLE PointArray element, that is, the element currently investigated (simple "For loop" with some flags to mark already processed elements).



code:
"ArrayBoolean" node that did exactly what its name means : Basic boolean operations between two PointArray[] objects.

More in depth, it provided these operations :

1) Array Union : 
Input : Two PointArray[] (named "A" and "B") also with different amount of elements, a DELTA (a javascript float number) and a PRECISION (a javascript int number) 

Output : a new PointArray[] containing all the "DISTINCT" PointArray elements of both arrays.

All the PointArray elements of "A" and "B" far from each other, NOT MORE THAN DELTA (considering the required PRECISION)
are WELDED into a SINGLE PointArray element.

2) Array Difference : 
Input : Two PointArray[] (named "A" and "B") also with different amount of elements, a DELTA (a javascript float number) and a PRECISION (a javascript int number) 

Output : a new PointArray[] containing all the PointArray elements of "A" that are NOT PRESENT in "B".

All the PointArray elements of "A" that are far from each "B" elements, for AT LEAST DELTA (considering the required PRECISION)
are returned into the output PointArray[].


I don't know if I made myself clear..

It's really too bad that "ArrayDistinct" and "ArrayBoolean" node that I was writing were lost because they were at and advanced alpha stage,
and from many tests I did they seemed to be very powerful for interesting elaborations in order to create some "exotic" nurbs objects.

Anyway, I must also say that they have been written with a very coarse businnes logic, and crunching more than some hundreds of PointArray elements,
produced very poor performances.


Have a nice day,

- Marco (mkdm)
From: Karsten (KMRQUS)
17 Oct 2016   [#528]
Hello Marco, James, wastzzz ...

I thought about randomly place geometry again and was reminded ArrayShuffle made by Marco. So I have updated the file for v0.85. I have made some test as an alternative to the node I have written (randomObj). Two different ways with different advantages:-)

Have a nice day
Karsten

@James: I'm indeed not interested in patterns or more precisely ornaments (my focus is smooth geometry), but it's not possible for me to ignore them and I think not useful also:-)

Attachments:
ashuffle.nod


From: James (JFH)
18 Oct 2016   [#529] In reply to [#528]
Hi Karsten

Ornament is a crime :-)

I think there may have been some semantic confusion.
I meant pattern as order not ornament; designation not decoration.

Thanks for updating these nodes, I greatly appreciate it.

-James
From: speedy (AL2000)
18 Oct 2016   [#530]
Hello Friends
a new little exercise to test some Karsten's nodes
best
al

Attachments:
CP-Tennis Ball.nod

Image Attachments:
Two Tennis Ball.jpg 


From: Karsten (KMRQUS)
18 Oct 2016   [#531] In reply to [#529]
Hello James,

I agree with you about ornaments and the different interpretation of "pattern". But I'm not an artist and haven't the creativity like some others here, so there are many different points of view about the aesthetics of ornaments, that I can accept.

Have a nice day
Karsten

p.s.: Please, don't let us start a dicussion about that here - I'm afraid about that!
From: mkdm
18 Oct 2016   [#532] In reply to [#528]
Hi Kartsen and good morning.

Thank you for updating my old arraysExt.js and litegraphExt.js.

N.B. I will begin by saying that I'running latest Max's verison "nodeeditor.v.0.85_mod.zip" at http://moi3d.com/forum/index.php?webtag=MOI&msg=7713.485

Well...I'm sorry but it seems that your updates doesn't works for me.
I think that I'm doing something wrong or I'm getting a little bit confused among various versions (mine and yours).

When I run your last experiment "ashuffle.nod" (http://moi3d.com/forum/index.php?webtag=MOI&msg=7713.528)
I get this error : http://take.ms/R2l59

Also if I run this simple .nod file (http://take.ms/mGHP8) I get this error : http://take.ms/LnRgz.

I'm running your arraysExt.js that you uploaded (http://moi3d.com/forum/index.php?webtag=MOI&msg=7713.528)
and this is my litegraphExt.js that has your modifications :

code:
// litegraphExt.js v.0.1 - Marco Di Mario (mkdm), 2016
// based on :
// 		Max Smirnov's Node Editor, v.0.65 - 2016
// 		litegraph.js library (c) Javi Agenjo http://tamats.com

pointArray.prototype.getElement = function(n)
{
	var idx = (n || 0);
	var shift = idx * this.recordLength;
	
	var element = {"pt":this.getPoint(idx),
		"AngleX":this.data[shift+3],
		"AngleY":this.data[shift+4],
		"AngleZ":this.data[shift+5],
		"Size":this.data[shift+6]};
		
	return element;
}

pointArray.prototype.copyElementDataTo = function(source_elem, n)
{
	var idx = (n || 0);
	var shift = idx * this.recordLength;
	
	if (source_elem) {	
		this.data[shift+0] = source_elem.data[0];
		this.data[shift+1] = source_elem.data[1];
		this.data[shift+2] = source_elem.data[2];
		this.data[shift+3] = source_elem.data[3];
		this.data[shift+4] = source_elem.data[4];
		this.data[shift+5] = source_elem.data[5];
		this.data[shift+6] = source_elem.data[6];
	}
}


What I'm doing wrong ?

P.S : Would you like to rewrite my lost :( experimental nodes ArrayDistinct and ArrayBoolean that I mentioned in my previous post ?
(http://moi3d.com/forum/index.php?webtag=MOI&msg=7713.527)

Have a nice day ?

- Marco (mkdm)
From: Karsten (KMRQUS)
18 Oct 2016   [#533] In reply to [#532]
Hello Marco,

sorry that I forgot to say that you don't need the litegraphExt.js and so I didn't posted an updated here. Max has integrated the getElement in the last version. The copyElement -Stuff I have integrated inline. So try to remove litegraphExt.js from index.html.

Have a nice day
Karsten
From: mkdm
18 Oct 2016   [#534] In reply to [#533]
Ahhhh....Ok Kartsen,

I did what you said and now all works fine. Thanks a lot!

What do you think about my proposal to rewrite my lost :( experimental nodes ArrayDistinct and ArrayBoolean that I mentioned in my previous post ?
(http://moi3d.com/forum/index.php?webtag=MOI&msg=7713.527)

Unfortunately, for the time being I can't deal that effort.
Maybe when Max's will release 1.0 version of Elephant...

Have a nice day.

- Marco (mkdm)

Show messages:  1-14  …  455-474  475-494  495-514  515-534  535-554  555-574  575-594  …  895-912