List or tuple output in a new node for superformula

paulidealiste's Avatar


08 Jul, 2013 06:04 PM

Hi all,

this is my first post regarding the fabulous NodeBox3.

I wanted to implement the code for superformula and supershape that was already a part of the NodeBox 1 library in NodeBox 3. I transfer the Python code easily for the single point along the supershape curve, but for path drawing it uses _ctx. start and end points. The output of the basic supershape function is a point, but in NodeBox3 I don`t know how to transfer it to a real point coordinate since it is a tuple and when I try to connect to i.e. point node I get the error that PyTuple cannot be cast to java.lang.Double.

Also, when I use function that returns a list, it works normally in Python code, but in NodeBox 3 I see the output is horizontal, i.e. all list nodes recognize it as a single line and not a list. How to fix this, or is it even necessary?

  1. 1 Posted by paulidealiste on 09 Jul, 2013 07:58 AM

    paulidealiste's Avatar

    Sorry for replying to my own topic but I wanted to attach one possible solution for the problem at hand.

    It has a simple .py file I have used in new nodes. This file has single-output functions, of which one (superformula) has a sine and the other (superformula1) has a cosine output that could be transfered to a point.

    Still I dont think this is the right solution since I cant reconstruct exact supershapes.

  2. 2 Posted by paulidealiste on 11 Jul, 2013 05:57 PM

    paulidealiste's Avatar

    Here is one solution I managed to pull out but still it is not proper I think. It uses python code (part of the old nodebox library) and it splits the output of basic function to two separate nodes (supershape and supershape1 one returning the sine and other returning cosine). Some shapes arise but I don`t think they are supershapes sensu supershape formula.

  3. Support Staff 3 Posted by lievenmenschaer... on 12 Jul, 2013 08:44 AM

    lievenmenschaert's Avatar


    this post is all about superformula in NB3. this should help..


  4. lievenmenschaert closed this discussion on 12 Jul, 2013 08:44 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

22 Feb, 2024 05:51 AM
22 Feb, 2024 01:11 AM
21 Feb, 2024 05:27 PM
21 Feb, 2024 04:49 PM
16 Feb, 2024 05:24 PM


06 Feb, 2024 04:45 AM
19 Jan, 2024 09:50 AM
13 Jan, 2024 03:47 AM
05 Jan, 2024 05:10 PM
05 Jan, 2024 04:54 PM
04 Jan, 2024 11:49 PM