How To... - Processing 2.x and 3.x Forum Sat, 17 Aug 2019 22:46:34 +0000 How To... - Processing 2.x and 3.x Forum en-CA Can u someone help me to draw this? (beziers) Wed, 16 May 2018 02:33:51 +0000 Fabboy 27980@/two/discussions I need draw only the ears please, i am not too good drawing bezierVertex, then i just need the ears, pleasee :(

how to program a simple wireframe cube with 3d maths (without box) only lines or vertexes ?? Mon, 10 Aug 2015 10:41:32 +0000 martinpla 12025@/two/discussions i would like to know the code of a 3D wireframe cube, without using any help like box etc. only the 3D Translation matrixes...thanks a lot for helping. martinpla

How do I import an "idx3-ubyte" file? Sun, 16 Sep 2018 04:03:52 +0000 Tsskyx 28118@/two/discussions I am wondering how to import the files found on this website into Processing:

They're supposed to contain thousands of 28x28 byte arrangements, each with its own "grayscale" value. In essence, they're images. But the files don't have a .dat extension, an extension I've learned to use thanks to the following tutorial:

I don't know what an .idx3-ubyte extension is and how to import it into an arbitrary Processing array correctly, and the Java guides I found online didn't help either, as the usual Processing code that I'm familiar with looks nothing like those chunks of code.

I also don't know how the bytes are structured inside the file, although I would assume the first 784 (28*28) bytes would correspond to the first supposed image, going left to right, downwards, and the next 784 would correspond to the second image, and so on.

Even figuring out how to convert this into a .dat file would help, as I am able to import those into and out of Processing easily.

Generated pattern wrap on 3D Sat, 08 Sep 2018 17:06:34 +0000 nineyearoldkid 28113@/two/discussions Hello, I have been to trying to program a cuboid with surfaces rendered in code generated patterns (image attached). While there is a texture wrap function for wrapping images, I couldn't find anything for SVG's or code generated patterns. Also, it seems texture wrap doesn't export for pdf/svg. I would like to render the final output as PDF or SVG. Does anyone know how to do this?

Thanks.Screen Shot 2018-09-08 at 10.22.23 PM

How do you use a specific element from a returned array that comes from a function? Tue, 31 Jul 2018 15:33:20 +0000 Scott06 28086@/two/discussions Hi, I've got a question. I have a custom defined function called Projection, that will return an array with two values. The first value is the X-coordinate and the second value is the Y-coordinate. I want to know how to be able to use the returned X-coordinate in a calculation. Thanks!

fill function for negative space Thu, 16 Aug 2018 21:19:30 +0000 EmRod 28098@/two/discussions Hi there, I'm looking for a simple way to fill the space AROUND a shape rather than the space WITHIN a shape.

Ideally I'm wanting this function so that when I use OpenCV on a webcam feed, processing puts a square around the face and then blocks out the rest of the image with a sold fill. So all you can see is the image inside the shape.

Increasing the stroke does not do this.

Any help greatly received!


make Processing REALLY portable ? Thu, 20 Aug 2015 15:48:46 +0000 scanet 12177@/two/discussions Hi, I'm working in schools and I would to create a portable version, usable on USB stick. Also because there are security, and as I work in different school there are different securities. On Processing3 I didn't find all the option I could find in Processing2 preferences.

Thansk a lot for helping me.

Achieve organic visual textures Sat, 09 Jul 2016 20:25:07 +0000 asadjmalik 17471@/two/discussions I'm sorry if the title doesn't explain what I'm trying to do. I've recently started learning processing and am going to go through all the lessons I can find today. I already program iOS so I'm not worried about the technical challenge but knowing how to transform a visual in my head to code is certainly challenging.

I'm trying to create images similar to the ones I've attached. I really don't know where to begin as far as getting the slight color variations and organic texture in terms of colors merging together.

Australia Turkey Turkey

Any advice or direction on which library, process, class I should explore would be very welcome.

[NEVERMIND] How to make my sketch receive the file dragged onto the executable? Fri, 29 Jun 2018 03:30:02 +0000 Architector_4 28066@/two/discussions I already found the answer to my question, just 3 seconds after posting it here. Sorry. Here's the original post:

Using Windows 10 64bit. So I exported my sketch, and I have a .exe file that starts by double-clicking. Nothing special here, I know. However, if I drag another random file in Explorer and drop it onto the .exe file, then it doesn't open - not even a window. Investigating with task manager shows that javaw.exe opens and then instantly closes right away.

From what I read, dropping a file onto a .exe simply makes Explorer run the .exe with path to the dropped file as a command line argument. But this isn't the case, or else the sketch wouldn't instantly close and I'd be able to get the received file path by reading args[0]. (args is an array of strings that contains every command line argument received)

I want to have a .exe on which I can quickly drag and drop files and which will perform my code on such files. How?

edit: After dropping the file onto the .exe 100th time out of desperacy, it actually opened and received the file as args[0]. This removes this question immediately, but I can't find the delete button(yet), and this also sparks a new question: why it didn't work previous 99 times?

How to save image with different settings? (bit depth, etc) Tue, 26 Jun 2018 17:42:44 +0000 Architector_4 28065@/two/discussions I have a small .bmp file that weighs 1296 bytes. When I do this string, it saves it as a .bmp files that weighs 558 bytes:


I assume this is because it saves it with a different bit depth. What can I do to make it save with bit depth of the original image? I need it to have same everything as the original file for technical reasons. Here's my test file:

And here's what I get:

edit: I'm not looking for just copying the image, which obviously can be done by copying the file over. I want to be able to edit them with functions like .get() and .set() and then save the result in the same format and with same characteristics as the input file.

edit2: Also I'm not looking for any size or efficiency advantages at all - an old videogame I'm working with just refuses to work with test2.bmp, while it can take test.bmp perfectly. And, from a bit of testing with different files I've concluded that the difference between input and output file that Processing introduces is what causes it.

Can someone help me to draw this? Fri, 02 Feb 2018 03:57:52 +0000 Fabboy 26216@/two/discussions Can someone help me to draw this in processing?

Please, i didnt know how to use bezierVertex :(Sin título

How to pick the place in the screen when run the sketch Tue, 05 Jun 2018 04:08:27 +0000 vjjv 28040@/two/discussions hello. at this time when i run my sketch 3 differents windows (PAplets) are opening, to controll different parameters of objects. but all of them open in the same place (the center of the screen), so i need to move it to see it. is there any way to pick the place of the windows when the sketch is ejecute? e.x one next to the other.

How to create an actual splash screen Thu, 25 May 2017 22:15:53 +0000 schotsl 22761@/two/discussions So I'm almost finished with my app although it takes quite a while to initialize everything when I start it up, I've looked up how to create a splash screen but I've only seen people put a picture inside setup but that doesn't do it for me since when I open the app I see a grey screen after which I would see a splash screen from setup, but I want the splash screen to be visible from the beginning (before setup?) how would I go about this

Diagonal Movement Library? Wed, 02 May 2018 05:24:53 +0000 Inertia 27899@/two/discussions Hey, I already know people have made solutions to this problem but I was wondering if anyone knew a Library for diagonal movement, Ideally can detect multiple keys pressed at once but I'll take anything you got ;)

Another quick question, I know that Processing/Java uses key/keyCode which is a primitive variable and why only one value can be detected at once but why do we stick with that? Is there a reason they haven't changed it because native diagonal movement/multiple keyPress detection has been a fair majority community's wishlist for quite a while now. Thanks for the help! :)

Clustering pixels in an image by colour over time Mon, 14 May 2018 20:54:40 +0000 daddydean 27972@/two/discussions I have this idea and im wondering if someone might be able to give me a few tips on how I might achieve this..
Basically, I'd like to be able to take an image and then treat each individual pixel as its own organism, so that a pixel of a certain colour value would be attracted to pixels of its own colour like a magnet, so perhaps heavy in the centre.
Each pixel would shift around until it reached its destination - all the pixels in the image would remain within the image, theyd just be rerranged at a final iteration.
But Id like to do it over time to see it actually visualized. Itd be like a ising model or some sort of markovian thing.
I looked around on github for methods to do this, but didnt really come up with anything.

How Do I Create A Loading Screen For My Game Project Mon, 14 May 2018 16:39:13 +0000 dtools22 27970@/two/discussions Hello,

I am working on a game project. Currently I am trying to set up an introductory cut scene using some audio files and pictures. When finished I am hoping it will look something like a slide show.

I have loaded into my program an audio file roughly 1 minute in length and 9 pictures that will take up a 1600x900 screen. When I click run in the IDE there is about a 2 second delay before the program runs. My question is, how would I create a loading screen to give the player some feedback that the game is just loading the different assets?

If anyone knows of any examples or tutorials that I could read through that would be very helpful. I feel like I need to understand more about how this process works before I can get to coding. Thank you for the help.

Load JSON model file for 3D graphics Mon, 14 May 2018 20:37:48 +0000 GameMaker123 27971@/two/discussions Hi. I'm trying to make a TerraTech clone, but I need custom models for the parts in the game. The version is currently Pre-alpha 1.0. I want to use JSON models and PNG textures for the parts, but I don't know how to load the models into Processing from the JSON files. Also, I want to use an NBT file for the inventories in each save.

Do things on a thread separate of draw Sat, 06 Jan 2018 16:21:50 +0000 theliquu69 25848@/two/discussions I have a method update(), and I want to run it separately of draw. Basically update() has to be faster than draw(), because otherwise the program is slow. How do I do that?

Grayscale PGgraphics to a gradient map Sat, 12 May 2018 14:44:42 +0000 dehyde 27959@/two/discussions Hi

I have a grayscale pgraphics that I'm crating that simulates accumulation and I want to transition the grayscale colors into a gradient map of multiple hues similar to the one in the attached image.

I'm not sure how to approach this.


Problems while saving a xml file Mon, 07 May 2018 14:58:55 +0000 erwrow 27933@/two/discussions Hi everyone, as the title suggest, i'm having an issue when i try to save a xml file.

basically the problem is that when i try to save a xml file with the function "saveXML()" it changes some chars, for example, if a variable has the char "&" it gets changed with "& amp;".

Any idea on what is happening?

(Mod edit, broke the html entity so it's visible)

How to find index of and element (a String) in an IntDict() Tue, 08 May 2018 10:38:27 +0000 dehyde 27938@/two/discussions Hi

I have an IntDict from a CSV file, for example:

The item key are string ("hello", "world"...)

Is there a function to recall the index of the word in the dict? for example:

String stringToCheck = "world"; print(dictLookup(stringToCheck)); //prints "1"

Where can I find the processing animation code for the following two pictures? Fri, 04 May 2018 08:26:30 +0000 Happier 27910@/two/discussions Hello, processing community,Where can I find the processing animation code for the following two pictures? Or is there any good opening animation case or code? look forward to your reply.

one two

I am trying to build a brick wall with procedures like odd row and even row but I don't know how to? Thu, 03 May 2018 01:40:19 +0000 maddoxfenomeno 27906@/two/discussions I don;t know how to code it can anyone please help ASAP

Youtube / Firefox control with Processing Fri, 04 May 2018 09:26:54 +0000 JorgeEduardoJonas 27912@/two/discussions Hello dear List!

I would like to know if there is a way to control youtube video reproduction, and any minor manipulations to this video in realtime. Also to control firefox, i.e. open a new tab, search for something, close tab, etc.

could somebody please point me in the direction I should look for?

I'm on Ubuntu 16.04.04 LTS

Any examples on Concave Hull/Alpha Hull in Processing? Thu, 03 May 2018 15:08:37 +0000 cicero38 27907@/two/discussions Would anyone know any references to Concave Hull (NOT Convex Hull)/Alpha Hull in processing? I've found reference to a paper by Moreira & Santos on Concave Hull, but my code is quite buggy...

Shadow effect in a PShape? Tue, 01 May 2018 20:45:51 +0000 mromarcoder 27895@/two/discussions Hello to everyone. I was wondering if it's possible to make a shadow effect to a PShape. For example, if the sunlight is coming from east, make the shadow appear in the west, or in the other way, if the sunlight is coming form west make the shadow appear in the east.

In processing, how to add a scroll bar to the window ? Fri, 27 Apr 2018 07:04:16 +0000 Happier 27860@/two/discussions Hello, processing community, I create a piece of code, I need the window to be as large as 1920*1080, but it cannot be fully displayed on the computer screen, so I want to know how to create a window scroll bar so that I can see I need , look forward to your reply, thank you :)

How to change the word spacing of the processing font? Thu, 26 Apr 2018 08:49:31 +0000 Happier 27855@/two/discussions In processing, there is a line spacing function, why there is no word spacing function, so how to change the font spacing of processing font? The picture is for reference only, haha, look forward to your reply.thank you.


Keyboard input Wed, 25 Apr 2018 20:13:49 +0000 Maaother 27851@/two/discussions How do I use keyboard input to display Text on the screen using text string?

Strings and keyboard Wed, 25 Apr 2018 23:33:49 +0000 Maaother 27852@/two/discussions How do I use keyboard input to display Text on the screen using text string ?