[script] FxGraph - 2D/3D Function plotter
 1-14  15-34  35-54  55-74  75-91

Previous
Next
 From:  Mike (MGG942)
6447.55 
Michael, I've being trying to use the idea of making a js file of the _FxGraph3D parameters but I'm having limited success.
Some work and some don't.

The following two work OK
Brian's leafsinh.js
moi.command.execCommand( 'FxGraph3D u;v;((exp(u) - exp((-1)*u))/2 + (exp(v) - exp((-1)*v))/2);-3.14159;3.14159;-3.14159;3.14159;15;15;0;0;0;UV' );
My MoebiusStripSolid.js
moi.command.execCommand( 'FxGraph3D cos(v)+u*cos(v/2)*cos(v);sin(v)+u*cos(v/2)*sin(v);u*sin(v/2);-0.4;0.4;0;6.20;15;15;1;1;1;UV' );

but this one (My TrumpetSolid.js) doesn't:
moi.command.execCommand( 'FxGraph3D cos(u)*sin(v);sin(u)*sin(v);cos(v)+log(tan(1/2*v));0;6.283;0.03;1.5;50;50;1;1;1;UV' );

For the life of me I can't see why.
When I try to run if from Max's Ext Scripts feature I get the following error:




  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:  Michael Gibson
6447.56 In reply to 6447.55 
Hi Mike,

re:
> but this one (My TrumpetSolid.js) doesn't:
> moi.command.execCommand( 'FxGraph3D cos(u)*sin(v);sin(u)*sin(v);cos(v)+log(tan(1/2*v));0;6.283;0.03;1.5;50;50;1;1;1;UV' );

Can you please post the My TrumpetSolid.js file so I can test it over here and take a look?


> When I try to run if from Max's Ext Scripts feature I get the
> following error:

That error looks like it's trying to execute that string as direct script code rather than seeing it as a command and parameter for that command. That will happen if the command is not recognized. Do you possibly have some spaces in the front before FxGraph3D ?

- Michael
  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:  Mike (MGG942)
6447.57 In reply to 6447.56 
Thanks, Michael.

Don't think that I have spaces where they shouldn't be, but ...

Attached my two files,

The one that works, MoebiusStripSolid.js, and the one that doesn't TrumpetSolid.js

Note that neither have an underscore preceding FxGraph3D - you may need to add that for your set up.

  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
6447.58 
I did observe the error with Trumpet.js, but after spending an inordinate amount of time, I managed to
fix the problem. I'm using _ before the _Trumpet.js, and also _ before _FxGraph3D.

- Brian

Edit: It has been very confusing.
3rd party .js scripts without leading _ show up in Max's Ext.Scripts list at the tail end, after all the ones with leading _. (Which is alphabetical.)
The same script with a leading _ show up at the front side of the Ext.Scripts list, without the _.

I use _FxGraph3D. Some other people use FxGraph3D, without the leading _. (So a missing .js error can occur, due to alternate names, with/without leading _.

Also, a carriage return, or cr/lf, in the .js can cause the first "(" to not match up with the last ")", which also causes a parse error.

EDITED: 31 Jul 2017 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:  Michael Gibson
6447.59 In reply to 6447.57 
Hi Mike, both those files seem to be working ok for me over here (after adding an _ before FxGraph3D).

Can you give me some more details like where you're placing those files and how you're triggering them to be called?

- Michael
  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:  Mike (MGG942)
6447.60 In reply to 6447.59 
Thanks Brian and Michael.

Now working OK.

Suspect that the problem was having more than one instance of Moi running.

However, before thinking of that I added the leading underscore to _FxGraph3D.js and _FxGraph3D.htm and altered my files to match which did not fix the problem.
After that I shut all instances down and then started one only.
Then the files worked.

Bit hard to believe that the underscores were the problem so I suspect that while doing this sort of stuff with more that one instance of Moi running is a no-no.
  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:  Michael Gibson
6447.61 In reply to 6447.60 
Hi Mike, glad you're set up ok now. Having more than one instance running can cause problems with setting up shortcut keys since the moi.ini file will get written at program shutdown time and so the last exited instance will be the one that ends up actually setting the moi.ini file. So yeah when getting things like this set up it's a good idea to exit other instances but once it's all set up you should be fine to use it with multiple instances.

- Michael
  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:  Mike (MGG942)
6447.62 In reply to 6447.61 
Got it.

Thanks.
  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:  speedy (AL2000)
6447.63 
Hi Mike,
your job is very appreciates ;
remember, however:that
omitting Math formulas that do not everybody Know
, and , Using elementary geometric elements
Such ,curves, polygon ,circles ,etc.etc
And using Elephant ;
Not only do you get the desired result, but you can
using the parameters used, modify it as you like
And why not, re-use it in successive jobs-
Furthermore make the result more understandable
reached ...
what do you think about it...
In some cases, believe me, as with Moebius
The goal is very easy-
link :
http://www.mediafire.com/file/gmef25bhq2dnp42/Solidify_Moebius.rar
Then concluding We urge you to begin with
Know Elephant-
Have a nice day
al
  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
6447.64 In reply to 6447.60 
One more thought, is your setting in moi.ini "DisableFileCaching=y" ?
- 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:  Mike (MGG942)
6447.65 In reply to 6447.63 
Al I'm going to! Really!
I've already found 'Project Elephant's UNOFFICIAL Repository' and will dive right in
  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:  Mike (MGG942)
6447.66 In reply to 6447.64 
Just checked, Brian, and the answer is no.
I have: DisableFileCaching=n
Mike.
  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
6447.67 In reply to 6447.66 
So modification of a .js script which has just been run in MoI, is not recognized until MoI is restarted.
(A more or less answer?)
- 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:  Mike (MGG942)
6447.68 In reply to 6447.63 
OK, Al, I've dived in.
As you wrote, the Basic Parametric Moebius.nod is wonderfully interactive. Most impressive.
However understanding how the nod was created is quite another story.
I'll read the Wiki.
Any other resources that you can recommend for a raw beginner?
Mike.

EDITED: 6 Aug 2017 by MGG942

  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:  speedy (AL2000)
6447.69 In reply to 6447.68 
Hi Mike

The recommendations for a newbie are as follows:
-
Knowing theNode, and getting in touch with them,
Understand what inputs are accepted and output results, etc .etc.
-
See if similarities with other modelers
Nodal- (Grasshopper for Rhino ), (Dynamo for Autocad)
for instance
-
Use the files that have been posted to the Forum
By me, by James, by Karsten etc etc
To understand the various steps and the results obtained

Lastly, persevere without being discouraged and beginning to think
to parametric modeling, planning the various phases
to reach the target...
My goal is "less it's more" but believe me not always and easy
succeed
Good depth
We'll talk with all , after the holidays..........
Greetings to you and all the friends of Forun
al
  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:  Mike (MGG942)
6447.70 In reply to 6447.63 
Al, Thank you for getting me started with Elephant.

I've been studying your Basic Parametric Moebius.nod and finding it difficult to understand how it could produce a solid Moebius strip when my many attempts to do so (outside of Elephant) have failed when using Loft to make the complete strip in one go.

Eventually - it took a while - I realised that your node is not producing a solid Moebius strip - with only one surface - but a strip with two surfaces. See below.
Did you also do the moebius.nod? No problem with the strips in that however I've temporarily given up trying to fully understand the nod - it's too complex for me at the moment.
Mike.





  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:  TOM (SIRTOM)
6447.71 
Hi.

Just stumbled over this information ...

https://mathematica.stackexchange.com/questions/72203/can-mathematica-solve-plateaus-problem-finding-a-minimal-surface-with-specifie

... which may be of interest for marh magician 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:  speedy (AL2000)
6447.72 In reply to 6447.70 
Hi Mike
By reading your observations, I have checked again
the file I sent, actually something is wrong,
the profiles, which are dorsal oriented that determine the volume
are badly oriented and thus produce a final screwing,
I've reviewed the file that you find at this link:
http://www.mediafire.com/file/9u89bmm8b6lfgyj/Rev-Solidify_Moebius_Strip.rar
I also added some pictures that will make you better
the question...
In the end however, as you see the result is a solid one
best
al
  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
6447.73 
HyperbolicParaboloid1:
_FxGraph3D u;v;u*v;-1;1;-1;1;50;50;0;0;0;UV

HyperbolicParaboloid2:
_FxGraph3D a*(u+v);b*(u-v);u*v;-1;1;-1;1;50;50;1.618;1;0;UV

HyperbolicParaboloid3:
_FxGraph3D (u);(v);c*((u*u)/(a*a) - (v*v)/(b*b));-1;1;-1;1;50;50;1.618;1;1;UV

HyperbolicParaboloid4:
_FxGraph3D (u);(v)/(sqrt(1+a*a*u*u));v*a*u/(sqrt(1+a*a*u*u));-1;1;-1;1;50;50;1;1;1;UV
  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
6447.74 
Trefoil2_3FourierKnot:

_FxGraph3D cos(2*u);cos(3*u + PI/4);cos(2*u + PI/2)+cos(u + PI/6);0;6.283185;0;0;200;0;1;0;1;UV

Note, there is a small space in the unclosed curve, locate-able by _MarkOpenCurveStart, or MarkCurveStart, or MarkCurveEnd script.
Trimming the curve with a point at say (0,-1,z), and blending the gap, will make a closed curve.

- Brian

EDITED: 17 Sep 2017 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
 

Reply to All Reply to All

 

 
Show messages:  1-14  15-34  35-54  55-74  75-91