23 Topics

Member Avatar for
Member Avatar for restrictment

Well we all have seen the common questions on creating squares and hollow squares out of asterisks in C++, but how about creating a program that prints out a circle in asterisks? Obviously this would look like an oval due to line adjustment, but it would be quite interesting to …

Member Avatar for CharlieCap
2
2K
Member Avatar for phony

I need to check my code has all these requirements. The requirements for “main()” are: a. Use an object. b. Declare all required variables. c. Output user information. d. Input the radius 1 and radius 2 to be used to calculate the area of two circles. e. Use object Circle …

Member Avatar for NathanOliver
0
481
Member Avatar for vegaseat

If you draw a series of close spaced shapes your eyes get fooled to see Moire patterns. Here is one example of this.

2
2K
Member Avatar for Stefce

Hello i have a little problem with moving ball around screen, also i'm confused why i cannot put this variables `double x = 0, y = 16, muvx = 0, muvy = 0;` at the public class MainActivity to be local variables and also i don't know how to set …

Member Avatar for peter_budo
0
2K
Member Avatar for 2384443

Hi everyone, i need your help.. I want to draw a circle,square and rectangle on Jframe on a click of a button.. This program was asked in my test paper, i couldn't get it right though bt i wanna know what my mistake is.. Plz help me.. import javax.swing.*; import …

Member Avatar for JamesCherrill
0
340
Member Avatar for beauty.is.raven

Write a Java application that prompts and reads a value representing the radius, of a circle, then prints the circle's circumference and area. I do not know where to start

Member Avatar for jwenting
0
400
Member Avatar for jason.angeles.75

import java.util.Scanner; import java.text.DecimalFormat; public class Main { public static void main(String[] args) { double radius; double circ; double area; radius = getRadius(); circ = calcCirc(); area = calcArea(); DecimalFormat fmt = new DecimalFormat ("0.##"); System.out.println("run \n " + "The circumference of the circle is \n" + circ + "The …

Member Avatar for Kenney_1
0
341
Member Avatar for vegaseat

You can draw a number of shapes directly on the PyGame window, and then save the drawing to an image file.

3
5K
Member Avatar for vegaseat

If you draw shapes that are closely spaced and shifted, you can create interesting interference patterns, so called moire patterns. Here is an example using the Python module PyGame to do the drawing.

2
725
Member Avatar for sunil5

namespace play_stop { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button4_Click(object sender, EventArgs e) { timer1.Interval = 1000; timer1.Start(); Counter = 0; } public void circles() { Graphics g = panel1.CreateGraphics(); g.DrawEllipse( new Pen(Color.Red),panel1.Width / 2, panel1.Height / 2,75, 75); Graphics h = …

Member Avatar for Momerath
0
190
Member Avatar for rem2

Hi there I'm making a project to show how some of algorithms work. Basically i needed to show some drawing pixel by pixel. I made the code below and tried to run it <script> function init() { var paper = Raphael(10, 50, 800, 600); var arr = []; var j …

Member Avatar for rem2
0
212
Member Avatar for bigwill2010

Write a Python program that draws a circle with radius 50 pixels and centered at the center of the canvas. Give the canvas white background color and make it expand with its frame whenever the user resizes the frame. The program will respond to some mouse and keyboard events as …

Member Avatar for bigwill2010
0
8K
Member Avatar for Blax

Hello, I am currently working on a school project and ran into a little bit of trouble. Every time I compile the program I get 2 errors they are: cirlce.java:23: incompatible types found : java.io.IOException required: char letter = get.ioException(); ^ cirlce.java:37: possible loss of precision found : double required: …

Member Avatar for stultuske
0
284
Member Avatar for sonicx2218

I made a creature composed of shapes in a Java Applet. I want to basically copy and paste the creature I made so I have say 7-8 copies on the same applet. but in different locations. Is there an easy way besides copying the entire code, and moving each coordinate …

Member Avatar for sonicx2218
0
275
Member Avatar for AdampskiB

Hello again! I'm having trouble trying to double the value of my coordinates in my point. The object is to create a pair of eyes and their position is identified by clicking a point in the graphic window which would allocated the centre of the left eye, and the second …

Member Avatar for AdampskiB
0
233
Member Avatar for ao_py

I am trying to draw circle in the upper left corner of a graphics window, and then move that circle at a diagonal to the bottom right corner, and then bounce it back to the upper left, and so on until my loop is exhausted. I can't get my moving …

Member Avatar for woooee
0
1K
Member Avatar for karthik_ppts
Member Avatar for karthik_ppts
0
239
Member Avatar for NicAx64

circle.h [code] // // circle.h // defines the functions to draw circle. // #ifndef CIRCLE_H #define CIRCLE_H #include <windows.h> typedef struct tagCircle { int x; int y; int radius; } Circle; /* set the window handle */ void SetWindowHandle(HWND); /* set pixel @parms int x xposition @parms int y yposition …

2
484
Member Avatar for mrar85

im' confuse with this function...how do i call one function so it can be used in another function?? [ICODE]#include <iostream> #include <cmath> using namespace std; double pi=3.1416; double getinput(); double distance(double,double,double,double); double radian(double); double circumferences(double); double area(double); double diameter(double); void displayresult(double,double,double,double); int main() { double x1,x2,y1,y2; double rad,perimeter,areas,dia; cout<<"Please enter …

Member Avatar for mrar85
0
150
Member Avatar for Ghostenshell

Trying to find an easier way to write my code. I am using the graphics.py module. I will add the graphics program as an attachment for anyone who does not have it or doesn't know what I am talking about. The first program I made is archery. Just simple circles …

Member Avatar for TrustyTony
0
2K
Member Avatar for flyingcurry

For homework, we have to find the time complexity class of certain algorithms and explain why it has that certain complexity class. So, I have a couple of questions: - Why is the first running time always so much longer than the ones after? (setting up the application or something??) …

Member Avatar for tong1
0
211
Member Avatar for vegaseat

Python programming can have its lighter moments. Here we use one of those moments to draw an optical illusion using the Tkinter canvas to draw a rectangle, some lines and circles.

2
623
Member Avatar for aquaticdeity

I tried to create 10 random circles with random colors using windows forms. The problem am not able to restrict my program to draw only 10 circles.It goes on and on. [code] Timer t = new Timer(); t.Interval = 1; t.Start(); t.Tick += new EventHandler(DrawCircle); [/code] is there any way …

Member Avatar for ddanbe
0
141

The End.