# Coding Questions

**URL:** https://discourse.processing.org/c/processing/processing-questions/15.md?page=5

[Latest](https://discourse.processing.org/latest.md) · [Categories](https://discourse.processing.org/categories.md) · [Tags](https://discourse.processing.org/tags.md)

**Page:** 6

---

## [3D modeling from the front camera](https://discourse.processing.org/t/3d-modeling-from-the-front-camera/44641)

<div class="topic-metadata">

**Author:** [@mimi](https://discourse.processing.org/u/mimi)\
**Replies:** 15\
**Last updated:** [July 10, 2024, 10:10am UTC](https://discourse.processing.org/t/3d-modeling-from-the-front-camera/44641 "2024-07-10T10:10:40Z")

</div>

Hello everyone, I will need to see help I am starting on processing. I have already started the code I would like to have but I can’t get a correct result, I attach an image of the result I would like. I would like to…

---

## [White flash on fullscreen](https://discourse.processing.org/t/white-flash-on-fullscreen/44654)

<div class="topic-metadata">

**Author:** [@larry](https://discourse.processing.org/u/larry)\
**Replies:** 5\
**Last updated:** [July 10, 2024, 4:30am UTC](https://discourse.processing.org/t/white-flash-on-fullscreen/44654 "2024-07-10T04:30:03Z")

</div>

Hello Does anyone know if it is possible to remove the white screen that appears for the first at the start of fullscreen apps ? I am using processing in a live show and would like to launch the app during the show with…

---

## [Can't render OpenGL mesh and P3D components at the same time](https://discourse.processing.org/t/cant-render-opengl-mesh-and-p3d-components-at-the-same-time/44624)

<div class="topic-metadata">

**Author:** [@Java.SourceForger](https://discourse.processing.org/u/Java.SourceForger)\
**Replies:** 1\
**Last updated:** [July 7, 2024, 12:54am UTC](https://discourse.processing.org/t/cant-render-opengl-mesh-and-p3d-components-at-the-same-time/44624 "2024-07-07T00:54:01Z")

</div>

I don’t know why I can’t use JOML meshes and P3D components at the same time. I followed the opengl tutorial for processing ( Advanced OpenGL · processing/processing Wiki · GitHub) And I was able to successfully render…

---

## [Keyboard not being read](https://discourse.processing.org/t/keyboard-not-being-read/35014)

<div class="topic-metadata">

**Author:** [@JoseMY](https://discourse.processing.org/u/JoseMY)\
**Replies:** 10\
**Last updated:** [July 2, 2024, 6:36pm UTC](https://discourse.processing.org/t/keyboard-not-being-read/35014 "2024-07-02T18:36:03Z")

</div>

Hi again. I’m having issues with keyboard not being read. At first, I though my issues were Draw() not looping (or not ending before next loop), but it seems Draw() is running at good fps rate. My project has a complic…

---

## [Please Help: Image Creation](https://discourse.processing.org/t/please-help-image-creation/44668)

<div class="topic-metadata">

**Author:** [@chipadelic](https://discourse.processing.org/u/chipadelic)\
**Replies:** 1\
**Last updated:** [July 1, 2024, 12:02am UTC](https://discourse.processing.org/t/please-help-image-creation/44668 "2024-07-01T00:02:54Z")

</div>

\< Hello Everyone! I am struggling to figure out a way to recreate this posterized image in processing using shapes for my processing class. the assignment is to create a portrait using shapes and I created this SVG in …

---

## [Troubleshooting Data Handling Issues in a Multithreaded Server Class for Multiple Client Connections](https://discourse.processing.org/t/troubleshooting-data-handling-issues-in-a-multithreaded-server-class-for-multiple-client-connections/44653)

<div class="topic-metadata">

**Author:** [@hakim](https://discourse.processing.org/u/hakim)\
**Replies:** 1\
**Last updated:** [June 28, 2024, 6:32pm UTC](https://discourse.processing.org/t/troubleshooting-data-handling-issues-in-a-multithreaded-server-class-for-multiple-client-connections/44653 "2024-06-28T18:32:05Z")

</div>

Hello, I hope you’re doing well. I did a server class to handle multiple client connections simultaneously. Each client sends a fixed amount of data that I want to store and then process into a CSV file. Here is the comp…

---

## [Logical AND with keys](https://discourse.processing.org/t/logical-and-with-keys/44631)

<div class="topic-metadata">

**Author:** [@Karrajo](https://discourse.processing.org/u/Karrajo)\
**Replies:** 2\
**Last updated:** [June 23, 2024, 3:54pm UTC](https://discourse.processing.org/t/logical-and-with-keys/44631 "2024-06-23T15:54:01Z")

</div>

Hi, Hello, I can’t find this question in the forum, let’s see if you can help me. I’m trying to create a condition when I press two keys at the same time, but it doesn’t work for me. Does anyone know if it’s a syntax is…

---

## [G4P window returning null](https://discourse.processing.org/t/g4p-window-returning-null/44632)

<div class="topic-metadata">

**Author:** [@hakim](https://discourse.processing.org/u/hakim)\
**Replies:** 2\
**Last updated:** [June 23, 2024, 3:24pm UTC](https://discourse.processing.org/t/g4p-window-returning-null/44632 "2024-06-23T15:24:13Z")

</div>

Hello, hope you doing all well , so i was adding a loading window to wait for configuration, first of all, this screen is trigerred upon a button click in another window, here s the code of the loading window : public v…

---

## [Start bash from sketch (Linux)](https://discourse.processing.org/t/start-bash-from-sketch-linux/44615)

<div class="topic-metadata">

**Author:** [@leclerke](https://discourse.processing.org/u/leclerke)\
**Replies:** 11\
**Last updated:** [June 22, 2024, 1:38pm UTC](https://discourse.processing.org/t/start-bash-from-sketch-linux/44615 "2024-06-22T13:38:53Z")

</div>

Hello, I would like to execute a bash file (compress.sh) from within a processing sketch. The bash file is stored in the same folder as the sketch. I tried exec("compress.sh");, but it did not work. Can you help me?

---

## [PImage displays well but exports as empty file](https://discourse.processing.org/t/pimage-displays-well-but-exports-as-empty-file/44605)

<div class="topic-metadata">

**Author:** [@TellAJoke](https://discourse.processing.org/u/TellAJoke)\
**Replies:** 6\
**Last updated:** [June 17, 2024, 11:06am UTC](https://discourse.processing.org/t/pimage-displays-well-but-exports-as-empty-file/44605 "2024-06-17T11:06:36Z")

</div>

Hello. In this code snippet I create a canvas and draw on it using a shader. The created image displays nicely, but when exported the PNG file is empty. Exporting the canvas directly wont work either. When I do loadPixel…

---

## [Drawing shader consistently regardless of size and position in canvas](https://discourse.processing.org/t/drawing-shader-consistently-regardless-of-size-and-position-in-canvas/44601)

<div class="topic-metadata">

**Author:** [@TellAJoke](https://discourse.processing.org/u/TellAJoke)\
**Replies:** 2\
**Last updated:** [June 16, 2024, 11:23pm UTC](https://discourse.processing.org/t/drawing-shader-consistently-regardless-of-size-and-position-in-canvas/44601 "2024-06-16T23:23:30Z")

</div>

Hello. I have custom glsl fragment shader files and am drawing them using rect(). I want the shader to be drawn as if it was an image, which means all the information should be present when drawn, and it should stretch d…

---

## [Hello, how to calculate a slider value](https://discourse.processing.org/t/hello-how-to-calculate-a-slider-value/44554)

<div class="topic-metadata">

**Author:** [@zlfp](https://discourse.processing.org/u/zlfp)\
**Replies:** 18\
**Last updated:** [June 12, 2024, 8:02pm UTC](https://discourse.processing.org/t/hello-how-to-calculate-a-slider-value/44554 "2024-06-12T20:02:40Z")

</div>

so, umm i have code class slide { PImage ball, line; int px, py, ipp, bpx; slide(PImage sb, PImage sl, int spx, int spy, int sipp) { ball = sb; line = sl; px = spx; py = spy; ipp = sipp; …

---

## [Why is my line not smoother?](https://discourse.processing.org/t/why-is-my-line-not-smoother/44414)

<div class="topic-metadata">

**Author:** [@SamDavePollard](https://discourse.processing.org/u/SamDavePollard)\
**Replies:** 5\
**Last updated:** [June 9, 2024, 5:57pm UTC](https://discourse.processing.org/t/why-is-my-line-not-smoother/44414 "2024-06-09T17:57:21Z")

</div>

Apologies for the noob question, but … when I run the following sketch in the Processing IDE I get a smooth line but when I attempt the same thing using Java and IntellijIDEA I get something a lot more pixellated as show…

---

## [How to call OpenGL functions in P3D](https://discourse.processing.org/t/how-to-call-opengl-functions-in-p3d/44552)

<div class="topic-metadata">

**Author:** [@Java.SourceForger](https://discourse.processing.org/u/Java.SourceForger)\
**Replies:** 1\
**Last updated:** [June 8, 2024, 5:39pm UTC](https://discourse.processing.org/t/how-to-call-opengl-functions-in-p3d/44552 "2024-06-08T17:39:40Z")

</div>

I know processing P3d is built on top of joml… So, how can I call joml’s openGL functions in processing? I wanted to do some advanced culling tecniques like occlusion culling, and to do that, I need access opengl calls…

---

## [Custom halftone grids for images using multiple .svg files \[Solved\]](https://discourse.processing.org/t/custom-halftone-grids-for-images-using-multiple-svg-files-solved/44540)

<div class="topic-metadata">

**Author:** [@devski](https://discourse.processing.org/u/devski)\
**Replies:** 1\
**Last updated:** [June 5, 2024, 8:57pm UTC](https://discourse.processing.org/t/custom-halftone-grids-for-images-using-multiple-svg-files-solved/44540 "2024-06-05T20:57:13Z")

</div>

Hello, I am new to processing and I would like to use it to generate custom halftone effects using SVG files. I have managed to create something like this so far. For my next step I am trying to figure out how to ma…

---

## [Spaceship Control](https://discourse.processing.org/t/spaceship-control/44531)

<div class="topic-metadata">

**Author:** [@Alam](https://discourse.processing.org/u/Alam)\
**Replies:** 2\
**Last updated:** [June 5, 2024, 6:54pm UTC](https://discourse.processing.org/t/spaceship-control/44531 "2024-06-05T18:54:12Z")

</div>

Hi! I’m creating simple solar system where you can moving around using spaceship. I have problem with camera. When i’m going right or left everythink is fine, but when move my mouse to far on top or down there is a came…

---

## [Clipping an imported SVG using arbitrary shape](https://discourse.processing.org/t/clipping-an-imported-svg-using-arbitrary-shape/44401)

<div class="topic-metadata">

**Author:** [@whoamikey](https://discourse.processing.org/u/whoamikey)\
**Replies:** 4\
**Last updated:** [May 24, 2024, 3:46pm UTC](https://discourse.processing.org/t/clipping-an-imported-svg-using-arbitrary-shape/44401 "2024-05-24T15:46:36Z")

</div>

Hey Folks Scratching my head on how to clip an imported SVG file using an arbitrary shape, not a rectangle. The two shapes I’m currently playing with is an isosceles triangle and an isosceles triangle that uses a bezier…

---

## [Print JPG file from Processing (printer)](https://discourse.processing.org/t/print-jpg-file-from-processing-printer/44461)

<div class="topic-metadata">

**Author:** [@dada](https://discourse.processing.org/u/dada)\
**Replies:** 10\
**Last updated:** [May 24, 2024, 3:35pm UTC](https://discourse.processing.org/t/print-jpg-file-from-processing-printer/44461 "2024-05-24T15:35:54Z")

</div>

Hi :slight\_smile: I try to print with usb printer from processing. I think this project’s process is simple. if i tap enter key, image file is printed. printing is fine. but I have problem, printer print image like th…

---

## [PacMan game field - how do I do?](https://discourse.processing.org/t/pacman-game-field-how-do-i-do/17319)

<div class="topic-metadata">

**Author:** [@ImDaGr3en](https://discourse.processing.org/u/ImDaGr3en)\
**Replies:** 6\
**Last updated:** [May 24, 2024, 3:21pm UTC](https://discourse.processing.org/t/pacman-game-field-how-do-i-do/17319 "2024-05-24T15:21:30Z")

</div>

As you see in the title, I’ve some problems in preparing the field for my PacMan. I had the idea of basing it all on an int matrix, which is going to be filled with numbers: as it is -1, I have the walls; as it is 1, it…

---

## [How to run code inside a sketch?](https://discourse.processing.org/t/how-to-run-code-inside-a-sketch/44471)

<div class="topic-metadata">

**Author:** [@aiapps](https://discourse.processing.org/u/aiapps)\
**Replies:** 1\
**Last updated:** [May 22, 2024, 11:40am UTC](https://discourse.processing.org/t/how-to-run-code-inside-a-sketch/44471 "2024-05-22T11:40:21Z")

</div>

Let’s say I have a variable of type String and it contains code, how can I run it inside a working sketch and get the output result?

---

## [How to warp an image](https://discourse.processing.org/t/how-to-warp-an-image/44386)

<div class="topic-metadata">

**Author:** [@doni](https://discourse.processing.org/u/doni)\
**Replies:** 8\
**Last updated:** [May 10, 2024, 8:30am UTC](https://discourse.processing.org/t/how-to-warp-an-image/44386 "2024-05-10T08:30:02Z")

</div>

hi i try to warp an image use following code but not works. need a help thank you PImage img; // Declare a variable to hold the image int widthTop = 102; // Example parameters int heightTop = 80; int widthBottom = 20; i…

---

## [Identical code works in Processing IDE, but not from VS Code/CLI](https://discourse.processing.org/t/identical-code-works-in-processing-ide-but-not-from-vs-code-cli/40124)

<div class="topic-metadata">

**Author:** [@blasphemy](https://discourse.processing.org/u/blasphemy)\
**Replies:** 2\
**Last updated:** [May 10, 2024, 7:29am UTC](https://discourse.processing.org/t/identical-code-works-in-processing-ide-but-not-from-vs-code-cli/40124 "2024-05-10T07:29:57Z")

</div>

I was going through this example from the website: Array 2D / Examples / Processing.org and I had no problem running it with the pre-built processing IDE. The file can also be run using CLI once saved to sketchbook. ada…

---

## [Why i can't do operations for arrays to arrays of custom classes](https://discourse.processing.org/t/why-i-cant-do-operations-for-arrays-to-arrays-of-custom-classes/44369)

<div class="topic-metadata">

**Author:** [@zlfp](https://discourse.processing.org/u/zlfp)\
**Replies:** 4\
**Last updated:** [May 2, 2024, 10:10am UTC](https://discourse.processing.org/t/why-i-cant-do-operations-for-arrays-to-arrays-of-custom-classes/44369 "2024-05-02T10:10:56Z")

</div>

shorter, there is the code we need class creature { float xp,yp; PImage ifa; } class animal extends creature { animal(float sxp,float syp,PImage sifa) { xp = sxp; yp = syp; ifa = sifa; } void NP(float n…

---

## [Trying to convert shadertoy 'ping pong feedback' buffer(?) to Processing](https://discourse.processing.org/t/trying-to-convert-shadertoy-ping-pong-feedback-buffer-to-processing/43863)

<div class="topic-metadata">

**Author:** [@psamead](https://discourse.processing.org/u/psamead)\
**Replies:** 13\
**Last updated:** [April 28, 2024, 11:27pm UTC](https://discourse.processing.org/t/trying-to-convert-shadertoy-ping-pong-feedback-buffer-to-processing/43863 "2024-04-28T23:27:19Z")

</div>

Hi my friends, I am trying to convert this shadertoy effect to the porcessing with shaders. In the shadertoy solution, it appears the Buffer A tap loads a channel with a buffer b and the Buffer C tap loads channel with…

---

## [Operations on TableRow object? Can't find sum](https://discourse.processing.org/t/operations-on-tablerow-object-cant-find-sum/44360)

<div class="topic-metadata">

**Author:** [@syzygy](https://discourse.processing.org/u/syzygy)\
**Replies:** 6\
**Last updated:** [April 28, 2024, 9:55pm UTC](https://discourse.processing.org/t/operations-on-tablerow-object-cant-find-sum/44360 "2024-04-28T21:55:52Z")

</div>

/\*data.csv looks like this- header 1, 1, 1, \*/ Table table; table = loadTable("…

---

## [Problem with storing packed-data in a texture](https://discourse.processing.org/t/problem-with-storing-packed-data-in-a-texture/44317)

<div class="topic-metadata">

**Author:** [@Jon](https://discourse.processing.org/u/Jon)\
**Replies:** 17\
**Last updated:** [April 26, 2024, 10:59pm UTC](https://discourse.processing.org/t/problem-with-storing-packed-data-in-a-texture/44317 "2024-04-26T22:59:35Z")

</div>

Hello forum members, I’m new to using shaders in Processing and need some help please. There is something I don’t understand about my code and I’m hoping one of you experts will be able to give me some guidance. In sum…

---

## [Missing overlay elements!](https://discourse.processing.org/t/missing-overlay-elements/44351)

<div class="topic-metadata">

**Author:** [@Unnikrishna](https://discourse.processing.org/u/Unnikrishna)\
**Replies:** 6\
**Last updated:** [April 25, 2024, 6:03pm UTC](https://discourse.processing.org/t/missing-overlay-elements/44351 "2024-04-25T18:03:28Z")

</div>

My background image is loading correctly. However, the overlay elements above the background image is not appearing. These are the overlay elements not appearing: Draw overlay, Draw Agent, Agent, Draw agents with dynami…

---

## [Array and PGraphics](https://discourse.processing.org/t/array-and-pgraphics/44344)

<div class="topic-metadata">

**Author:** [@Erif](https://discourse.processing.org/u/Erif)\
**Replies:** 4\
**Last updated:** [April 24, 2024, 8:05pm UTC](https://discourse.processing.org/t/array-and-pgraphics/44344 "2024-04-24T20:05:55Z")

</div>

Hi everyone, I’m trying to run this PGraphics example where the output is shown in an off-screen graphics buffer (3000x3000 canvas), however it seems the mouseX,mouseY coordinates are being taken from the actual 500x500…

---

## [Player() class flies itself into the void on run](https://discourse.processing.org/t/player-class-flies-itself-into-the-void-on-run/44332)

<div class="topic-metadata">

**Author:** [@Superfixion16](https://discourse.processing.org/u/Superfixion16)\
**Replies:** 1\
**Last updated:** [April 23, 2024, 1:31am UTC](https://discourse.processing.org/t/player-class-flies-itself-into-the-void-on-run/44332 "2024-04-23T01:31:54Z")

</div>

Im working on creating movable players and wall collisions for my maze game, but whenever I run the code my player model instantly flies itself upwards. I know it’s something within my collision function, but I’ve looked…

---

## [How to open multiple windows?](https://discourse.processing.org/t/how-to-open-multiple-windows/44271)

<div class="topic-metadata">

**Author:** [@WillyGrz](https://discourse.processing.org/u/WillyGrz)\
**Replies:** 3\
**Last updated:** [April 19, 2024, 1:06am UTC](https://discourse.processing.org/t/how-to-open-multiple-windows/44271 "2024-04-19T01:06:18Z")

</div>

When you’re messing around for fun or something, I’m able to make the window move or resize if I want to. Is there a way to open multiple windows with the same code?

[Previous page](https://discourse.processing.org/c/processing/processing-questions/15.md?page=4)

[Next page](https://discourse.processing.org/c/processing/processing-questions/15.md?page=6)
