Facebook killed the radio star. And by radio star, I mean the premise of distributed forums around the internet. And that got got by Instagram/SnapChat. And that got got by TikTok. Where the fuck is the internet we once knew?
0 Members and 1 Guest are viewing this topic.
i = 0;do i++ plot_pixel(sin(i), cos(i));loop
Incidentally, I don't know if it's common knowledge or not, but if you do this:Code: [Select]i = 0;do i++ plot_pixel(sin(i), cos(i));loopIt draws a circle. Although it works better if you increment i by very small values, it's all good. I learned that a long long time ago when I was playing with QBasic graphics. By plotting SIN and COS against each other I used to draw spirals and waves and circles and stuff.
import java.awt.*;import javax.swing.*;/** This class demonstrates drawing a circle by using the point {sin(i), cos(i)} @author William LaFrance @date 22 April 2006*/public class DrawCircle extends JFrame{ /** Program entry-point<br /> Calls class constructor @param args Command-line arguments, split by spaces */ public static void main(String args[]) { new DrawCircle(); } /** Class constructor<br /> Creates JFrame object and initalizes it */ private DrawCircle() { super("Circle Thing!"); this.setSize(1000, 1000); this.getContentPane().setBackground(Color.black); this.setDefaultCloseOperation(EXIT_ON_CLOSE); this.setVisible(true); } /** Draws the circle on the JFrame @param g Graphics object to use for drawing on the JFrame */ public void paint(Graphics g) { g.setColor(Color.yellow); for (double i = 1; i < 100; i+=0.05) { g.fillRect((int)(Math.sin(i)*450)+500, (int)(Math.cos(i)*450)+500, 2, 2); } }}
I'd personally do as Joe suggests
You might be right about that, Joe.
public void DrawCircle(Color outlineColor, Point center, int radius, Image target){ using (Graphics g = Graphics.FromImage(target)) { g.DrawEllipse(new Pen(new SolidBrush(outlineColor)), center.X - radius, center.Y - radius, center.X + radius, center.Y + radius); }}
I have a programming folder, and I have nothing of value there
Our species really annoys me.
Quote from: iago on April 21, 2006, 08:25:23 pmIncidentally, I don't know if it's common knowledge or not, but if you do this:Code: [Select]i = 0;do i++ plot_pixel(sin(i), cos(i));loopIt draws a circle. Although it works better if you increment i by very small values, it's all good. I learned that a long long time ago when I was playing with QBasic graphics. By plotting SIN and COS against each other I used to draw spirals and waves and circles and stuff. Welcome to being bored in high school with your first TI graphing calculator :-P
[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min[20:21:15] xar: that was funny