Skip to main content

All Questions

Tagged with
0 votes
2 answers
82 views

Recognize a 2D geometric shape by bounds in 2D grid

I'm creating an Android application using kotlin where user can draw something in a cell grid and my app should response what the shape it is. I'm not looking for a computer vision neural network, ...
aDragon's user avatar
  • 21
1 vote
1 answer
55 views

Can't Draw/Add image to the List in java

All code which is linked to ArrayList/List i have: public void draw(Graphics2D gImages) { List missiles = aiShooter.getMissiles(); if(keyH.shooting) { for(int i = 0; i < missiles....
Reyni's user avatar
  • 11
0 votes
1 answer
275 views

Terrible performance with VolatileImage

I recently heard about how awesome VolatileImage's performance is. I decided to switch from BufferedImage to VolatileImage, but it made things a lot worse. 1000 images performance test with ...
bwegrzyn's user avatar
0 votes
0 answers
61 views

Java - Draw Arcs using Quadcurve2D

I managed to read DXF arcs and render them into a 3D Canvas I made. See attached image. To render the 2D arcs I "cut" them into small linear segments (small lines) and then I draw them on my ...
Nikos's user avatar
  • 87
-1 votes
1 answer
564 views

I want to draw a car in java that moves from side to side but it doesn't really work. Feel free to comment and edit it! Thanks [closed]

*I want to draw a car in java that moves from side to side but it doesn't really work. Feel free to comment and edit it! I am just trying to use java.awt.event, java.swing, and java.awt! Thanks* I ...
Mara Smith's user avatar
1 vote
1 answer
276 views

Rotating Star Field | Immitating 3D Space on a 2D Plane

I am working to simulate a 3D star field on a 2 dimensional surface where the viewer can turn in only the x direction. With a normal 2D star field of course you could simply modify X / Y positions of ...
Durgal's user avatar
  • 25
0 votes
0 answers
90 views

Animation stutter in Java's 2D rendering engine when object is moving fast

I have been making a simple game in Java's 2D rendering engine and stumbled upon a problem, where if an object is moving fast enough, the animation will stutter every couple seconds or so. I want to ...
jul_cioo's user avatar
0 votes
1 answer
275 views

Java AWT Graphics Class: Making Rows and Columns of Squares

I'm using the java.awt graphics class, and I'm trying to make rows and squares. I can't seem to get the layout of the rows correctly. I'm trying to code 8 rows with 3 columns each. However, I just get ...
Chloe J's user avatar
0 votes
0 answers
62 views

How to add more images moving at a different speed

I'm trying to make a program that will work and function like simple horse races, but I can't set different speeds. As far as I can see, see that when the timer gets different values, for example: I ...
Mihailo E's user avatar
0 votes
1 answer
55 views

The Image to be moved to JFrame is not displayed

I tried to make a regular program to display a moving image, I'm not sure what I'm doing wrong, when the code starts I only get an empty program. Maybe it's actually moving but I didn't put it to be ...
Mihailo E's user avatar
1 vote
1 answer
533 views

Polygon Z Ordering

I am currently trying to write a 2D only 3D "renderer" that uses polygons only. Before rendering, I order the polygons by calculating one Z value as following: double z = (v1.getZ()+v2.getZ()...
ozzi-'s user avatar
  • 309
0 votes
2 answers
392 views

Calculate the points of a single line between two rectangles in Java

Assuming we have calculated the line segment between the centers of two rectangles that do not overlap. ...What's the easiest way in Java to recalculate the points of that line segment if we only ...
Lauren_G's user avatar
0 votes
1 answer
77 views

Java API for rendering 2D and 3D interactive graphics (Javaview substitute) [closed]

I will teach a course on Computer Graphics, and want a Java library that creates 2D and 3D interactive graphics based on math models (points, areas, lines). The last one I used was Javaview, back in ...
vinicius de novaes's user avatar
0 votes
0 answers
185 views

Thrust method for an asteroids duplicate Java

I have a project that is similar to the Asteroids game. The game contains a thrust method, which like the name suggests thrusts the spaceship. The method is not thrusting in the direction I am asking ...
sobarzo_14's user avatar
0 votes
1 answer
110 views

How would I check if a Rect I have drawn on a JPanel has been clicked?

How would I go about checking if any of the Rects I've drawn (or filled, if you will) with my drawChessSquare() method have been clicked? I have tried looking into the processMouseEvent() method but I'...
Ewan H's user avatar
  • 17

15 30 50 per page
1
2 3 4 5
11