Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];


How to do? Find similar branches

nazgul   (2001-12-15 14:28) [0]

It is necessary to write a program on a dolphin.
To build the function Graph according to the given formula.
They say you can use the Chart component.
but how do I not know?

KilkennyCat   (2001-12-16 07:35) [1]

Uh ... first you need a delphi. Any.
But the Chart is not needed, or not necessarily it. It depends on how you draw.
If you just need to draw some thread parabola to demonstrate the formula, then any canvas is taken ... for example, like this:

I took a PaintBox of size 300x300
in the onPaint handler, all pixels satisfying the condition y = 5 * sin (x / 3)
painted black:

procedure TForm1.PaintBox1Paint (Sender: TObject);
i: integer;
x, y: real;
for i: = 1 to 30000 do begin
x: = i / 100;
y: = 5 * sin (x / 3);
PaintBox1.Canvas.Pixels [round (x), round (y) + 150]: = clBlack;

cycle 30000 times in order to increase the graphic resolution,
accordingly, in the future, the x and y coordinates decrease by a hundred times.
If this is not done, the solid line will not work.
Xnumx is added to y to offset vertically.

PS It's funny, checking this code, I was amusing myself for half an hour, drawing any kind of byak, but I still could not find a formula for rendering a parabola ... I forgot completely the math.

MBo   (2001-12-16 07:47) [2]

you put on the chart form, create series1 in it

for i: = 1 to 100 do begin
x: = 0.1 * i;
y: = tvoyaformula (x);
series1.addxy (x, y);

$Hic0   (2001-12-16 16:39) [3]

:)) y: = sqr (x) - parabola :)

BFG   (2001-12-16 16:40) [4]

>> Nazgul
And do not want so that any schedule
the function recorded in Edit, when a button is pressed, is displayed through the Canvas image? I’ve been tormenting this for quite a while, and nothing good has come of it. If you can stir up that, then go to paarik@zeos.net

nazgul   (2001-12-16 21:23) [5]

I already figured out
I wrote a program that interprets the graph of a function written in Edit "e
And draws it on a chart

Pat   (2001-12-17 00:59) [6]

> nazgul
Lather a program, please. I have long been *** with this question.

Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];


Memory: 0.56 MB
Time: 0.023 c
2001-10-26 17:57
Are there many left-handers among programmers?

2001-11-04 18:09
Is it possible to intercept keystrokes: Ctrl + Esc, Ctrl + Alt + Del

2001-10-10 19:02
There is a NETWORK CARD without a passport, sealed up!

2001-12-19 15:14
People, quite an easy question! Link to the procedure in one word.

2001-12-15 09:28
Millet question!

afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Spanish swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada Khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
English French German Italian Portuguese Russian Spanish