Home All Groups Group Topic Archive Search About

using the Point object

Author
21 Jun 2006 3:41 AM
pcnerd
I want to create a program that will do graphics like math functions &
fractals & stuff. I've been browsing thru books at the bookstores.
Apparently, the Point object replaced Pset. The books explain how to create a
Point object, but not how to use it. I want to be able to plot individual
pixels. I tried DrawEllipse, but that just draws circles. I reckon that I
have to somehow use the Pen & the Point object. I don't want to draw lines. I
want to be able to plot individual pixels, not circles or ellipses or lines
or boxes. Do I have to create a class & use the object to plot the pixels?
So, how do I use the Point object to plot individual pixels? Thank you. David

Author
21 Jun 2006 8:01 AM
GhostInAK
Hello pcnerd,

Point does not replace PSet.  Point is a coordinate, not a pixel.  Two Points
make a line-segment.  4 Points make a rectangle.. etc.

Look at the Graphics object for drawing functions.  You may have to resort
to drawing a rectangle with a width and height of 1.

-Boo

Show quoteHide quote
> I want to create a program that will do graphics like math functions &
> fractals & stuff. I've been browsing thru books at the bookstores.
> Apparently, the Point object replaced Pset. The books explain how to
> create a Point object, but not how to use it. I want to be able to
> plot individual pixels. I tried DrawEllipse, but that just draws
> circles. I reckon that I have to somehow use the Pen & the Point
> object. I don't want to draw lines. I want to be able to plot
> individual pixels, not circles or ellipses or lines or boxes. Do I
> have to create a class & use the object to plot the pixels? So, how do
> I use the Point object to plot individual pixels? Thank you. David
>
Author
22 Jun 2006 1:15 AM
pcnerd
I tried using DrawEllipse. It draws circles. When I set the height & width
to one pixel, the program draws little boxes.As I previously stated , I don't
want to draw lines or circles or boxes. I want to plot INDIVIDUAL pixels.

Thank you.

Show quoteHide quote
"GhostInAK" wrote:

> Hello pcnerd,
>
> Point does not replace PSet.  Point is a coordinate, not a pixel.  Two Points
> make a line-segment.  4 Points make a rectangle.. etc.
>
> Look at the Graphics object for drawing functions.  You may have to resort
> to drawing a rectangle with a width and height of 1.
>
> -Boo
>
> > I want to create a program that will do graphics like math functions &
> > fractals & stuff. I've been browsing thru books at the bookstores.
> > Apparently, the Point object replaced Pset. The books explain how to
> > create a Point object, but not how to use it. I want to be able to
> > plot individual pixels. I tried DrawEllipse, but that just draws
> > circles. I reckon that I have to somehow use the Pen & the Point
> > object. I don't want to draw lines. I want to be able to plot
> > individual pixels, not circles or ellipses or lines or boxes. Do I
> > have to create a class & use the object to plot the pixels? So, how do
> > I use the Point object to plot individual pixels? Thank you. David
> >
>
>
>
Author
21 Jun 2006 11:58 AM
guy
try creating a bitmap, you can then use the SetPixel method to set the colour
of the point you want

checkout  the BitMap class in the docs

hth

guy

Show quoteHide quote
"pcnerd" wrote:

>
> I want to create a program that will do graphics like math functions &
> fractals & stuff. I've been browsing thru books at the bookstores.
> Apparently, the Point object replaced Pset. The books explain how to create a
> Point object, but not how to use it. I want to be able to plot individual
> pixels. I tried DrawEllipse, but that just draws circles. I reckon that I
> have to somehow use the Pen & the Point object. I don't want to draw lines. I
> want to be able to plot individual pixels, not circles or ellipses or lines
> or boxes. Do I have to create a class & use the object to plot the pixels?
> So, how do I use the Point object to plot individual pixels? Thank you. David
Author
22 Jun 2006 1:20 AM
pcnerd
OK, can you be more specific? Is the bitmap created in the background in
memory & then displayed? So, for example, if I wanted to display a fractal,
the fractal would be created as a bitmap & then displayed? Is that correct?

Thank you.
David

Show quoteHide quote
"guy" wrote:

> try creating a bitmap, you can then use the SetPixel method to set the colour
> of the point you want
>
> checkout  the BitMap class in the docs
>
> hth
>
> guy
>
> "pcnerd" wrote:
>
> >
> > I want to create a program that will do graphics like math functions &
> > fractals & stuff. I've been browsing thru books at the bookstores.
> > Apparently, the Point object replaced Pset. The books explain how to create a
> > Point object, but not how to use it. I want to be able to plot individual
> > pixels. I tried DrawEllipse, but that just draws circles. I reckon that I
> > have to somehow use the Pen & the Point object. I don't want to draw lines. I
> > want to be able to plot individual pixels, not circles or ellipses or lines
> > or boxes. Do I have to create a class & use the object to plot the pixels?
> > So, how do I use the Point object to plot individual pixels? Thank you. David
Author
22 Jun 2006 10:55 AM
guy
put a picurebox on your form

create a bitmap in code

set the picureboxes image property to your bitmap

so in your case instantiate a bitmap and
use your fractal algorithm to draw on the bitmap

look at the docs for the bitmap class

hth

guy

Show quoteHide quote
"pcnerd" wrote:

>
> OK, can you be more specific? Is the bitmap created in the background in
> memory & then displayed? So, for example, if I wanted to display a fractal,
> the fractal would be created as a bitmap & then displayed? Is that correct?
>
> Thank you.
> David
>
> "guy" wrote:
>
> > try creating a bitmap, you can then use the SetPixel method to set the colour
> > of the point you want
> >
> > checkout  the BitMap class in the docs
> >
> > hth
> >
> > guy
> >
> > "pcnerd" wrote:
> >
> > >
> > > I want to create a program that will do graphics like math functions &
> > > fractals & stuff. I've been browsing thru books at the bookstores.
> > > Apparently, the Point object replaced Pset. The books explain how to create a
> > > Point object, but not how to use it. I want to be able to plot individual
> > > pixels. I tried DrawEllipse, but that just draws circles. I reckon that I
> > > have to somehow use the Pen & the Point object. I don't want to draw lines. I
> > > want to be able to plot individual pixels, not circles or ellipses or lines
> > > or boxes. Do I have to create a class & use the object to plot the pixels?
> > > So, how do I use the Point object to plot individual pixels? Thank you. David