#How to make circle without java fx

41 messages · Page 1 of 1 (latest)

frail garden
#

make circle in java
without java fx
and the diameter = number of spaces which is input by user
Please help i am noob

visual nebulaBOT
#

This post has been reserved for your question.

Hey @frail garden! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

noble lark
#

Do you want to draw the circle on the screen?

indigo birch
#

generally, where do you want to display the circle, how should it look in the end

noble lark
#

Or do you want to write it in the console?

#

and if you want to draw it on the screen - Do you want to use Swing? SWT?

frail garden
#

i just want a circle

frail garden
#

it should be a circle in the terminal

#

with 10 spaces long diameter for example

frail garden
#

it should be printed in the terminal

cursive zealot
#

Ok and what have you tried?

frail garden
cursive zealot
#

You will have to print characters in a shape of circle. Also you will have to draw it line by line since Java do not support setting coordinates in a console

indigo birch
#

ansi escape sequences can theoretically set the cursor coordinates

#

platform independent

#

it's just not a good way to do this

frail garden
#

right ??

indigo birch
#

you're better of doing literally anything else

frail garden
#

can you pls send code if you got time

frail garden
indigo birch
#

i can think of like 3 different, better ways of doing this right now

#

don't do it via the ansi escape method

frail garden
indigo birch
#

use Math.sin and Math.cos to make the circle, record rounded positions in a map, go through the map top to bottom, print out the entries line by line

frail garden
indigo birch
#

probably not

#

figure it out yourself, you're a programmer afterall

#

we can help you, but we won't write all the code for you

frail garden
#

i dont know shit

#

bro :(

#

there 12 year olds better than me

#

welp thnx anyways

#

for giving time to my useless shit

#

thanks fells