View Full Version : Hoi, Snee!
Barbarossa
03-29-2007, 04:16 PM
GMail rejected my email :O
Therefore I have no option but to attach the aforementioned file here, talk about it a bit, and share it with everyone.
God help me :ermm:
manker
03-29-2007, 04:20 PM
If you'd used put a password on the zip, Gmail would have accepted it :dry:
Barbarossa
03-29-2007, 04:23 PM
<---- doesn't use GMail much.
That's insane :wacko:
EDIT:.. ohhhhhhh, you rodding swine. :angry:
Can I send or receive zipped attachments?
Gmail allows you to send and receive zipped attachments, as long as they don't contain executable (.exe) files. Gmail rejects all executable files as a security measure to block potential viruses.
Colt Seevers
03-29-2007, 04:25 PM
Fractal city!
manker
03-29-2007, 04:26 PM
<---- doesn't use GMail much.
That's insane :wacko:
EDIT:.. ohhhhhhh, you rodding swine. :angry:
Can I send or receive zipped attachments?
Gmail allows you to send and receive zipped attachments, as long as they don't contain executable (.exe) files. Gmail rejects all executable files as a security measure to block potential viruses.
I'm just surmising. I don't actually know this for definite.
My thinking is this; the virus checker won't allow scripts or coding of any sort which could be a virus, and so won't get fooled if it's in a simple zip. However, if you were to encrypt the zip, the virus checker will let it thro' as it's not clever enough to look inside.
Barbarossa
03-29-2007, 04:29 PM
:idunno:
Cheese
03-29-2007, 04:33 PM
If you zip it and then zip it again it'll go through.
Barbarossa
03-29-2007, 04:34 PM
lollies, google are idiots
manker
03-29-2007, 04:37 PM
lollies, google are idiots
Indeed.
They seem to have out-foxed you, but.
Barbarossa
03-29-2007, 04:38 PM
cheese made that up. It doesn't work :dabs:
It does with rars, fool :P (encrypting, that is.)
I know that for a fact.
You can remove it now, if you'd like, btw.
Barbarossa
03-29-2007, 04:42 PM
rar rar rar :01:
I'm going home.
Cheese
03-29-2007, 04:43 PM
cheese made that up. It doesn't work :dabs:
I meant with Winrar :dabs:
manker
03-29-2007, 04:45 PM
cheese made that up. It doesn't work :dabs:
I meant with Winrar :dabs:
Like the whole intarweb uses Winrar.
Winzip must be for computer newbs like Barbie, I spose :idunno:
It sort of gets pwned by a regional difference wrt number-formats.
It errors out somewhat fierce with decimals. I think I'd need to recompile it to get it working completely, but I get it running enough to see how it's supposed to :happy:
Proper Bo
03-29-2007, 05:10 PM
rename the extension from .exe to .barbielovespeen and it'll work fine.
(won't need to be zipped, either)
fact.
Gripper
03-29-2007, 05:55 PM
hmmm that sounds familiar.
Barbarossa
03-29-2007, 07:09 PM
It sort of gets pwned by a regional difference wrt number-formats.
It errors out somewhat fierce with decimals. I think I'd need to recompile it to get it working completely, but I get it running enough to see how it's supposed to :happy:
:frusty: You just know I'm going to have to try and fix it tomorrow :frusty:
Disclaimer - It was 4 years ago I wrote that. I'd only been doing Delphi a short while then.
Might be something to do with the .net-framework if it uses that.
The error I keep getting is "'2.5' is not a valid floating point value", upon starting it.
Probably because this is a swedish os, and we use commas instead of dots for decimals. (Changing it to 2,5 works.)
A couple of time I've managed to make it return a string and tell me that isn't a valid floating point value, when using the left arrow.
Barbarossa
03-29-2007, 07:31 PM
Yeah, it's a locale problem. Should be easy to recreate/fix first thing tomorrow.
k-o.
If you feel like it :idunno:
It sort of works now, so.
Barbarossa
03-29-2007, 07:36 PM
Professional pride, and all that :idunno:
Aight.
Can't argue with that :01:
Barbarossa
03-29-2007, 07:39 PM
Oooh - did you click on "Show Attractors"? :blink:
As far as I know, that feature is unique to me, I've never seen another one do that sort of pattern :idunno:
TBH, 'cos of the number issue, I think something is a bit off, 'cos I don't get very interesting patterns at all.
Wasn't gonna say nothing tho', 'cos you seemed well chuffed with it, like :P
Since you are fixing it tho, I'll wait and have a look tomorrow.
Actually, when I started messing around with it just now, everything got waaay kewler.
I should have tried some more, silly me.
It's only the numbers that are ghey.
EDit: Oh, and since I can't see the code, I dunno what it takes, but would it be possible to set the pixel-size of the sides separately? And could you up the max to 1280 :smilie4: :gotsideas:
Barbarossa
03-30-2007, 09:53 AM
TBH, 'cos of the number issue, I think something is a bit off, 'cos I don't get very interesting patterns at all.
Wasn't gonna say nothing tho', 'cos you seemed well chuffed with it, like :P
Since you are fixing it tho, I'll wait and have a look tomorrow.
Yeah, because it bombed out because of the numbers problem, it didn't set up the colours properly :fist:
No wonder you thought it was shit. You probably think I'm an idiot :frusty:
I've fixed it now anyway.
Changing the lengths of the each of sides is a good idea, traditionally the images are always square, so that's what I did, and then I did ridiculously elaborate processing to set the window size to match the image size, and vice versa :wacko:
I should have optimised it for desktop dimensions. Oh well, that would be a bit of a rewrite, maybe I will have a go, but not today. I'd have to change the drawing algorithm, but I've forgotten how it works, because it's multi-threaded :(
Oh, ok, don't worry too much about it. I just thought it'd be sweet if it generated desktop bgs straight away, like.
Also, when I fiddled with it (the messed-up one), it looked ok, so I don't think it's a bad application.
Made some really kewl patterns after a bit :smilie4:
I was tinkering with gimp later on, with the fractalexplorer-filter, and found that I could generate similar patterns as wot yours does with the attractors on.
Yours is more fun tho'.
Initially tho', I was wondering a bit if I was doing something wrong, like :lol:
Barbarossa
03-30-2007, 03:35 PM
I just had a look, and converting that program to do them non-square would be teh hard :(
Mainly because it would fuck up all the co-ordinates and that when you select the next image to draw. :idunno:
Anyway, attached is the version that should work for you without the errors.
If you're interested, here is the source for the drawing algorithm :wacko:
unit MandelCalc;
interface
uses
Windows, Classes, Graphics, SysUtils;
type
TMandelCalc = class(TThread)
private
{ Private declarations }
X, Y, Len, Colour, Focus, XStep : integer;
DrawRect : TRect;
ColPoints : Array [0..1023] of integer;
procedure Synchro;
protected
procedure Execute; override;
public
{ Public declarations }
constructor Create(InitR, InitI, Size, SeedR, SeedI : Extended;
MaxLen, MaxIterate, ParmStep : integer;
FracJulia, dspAttract, dspMono : boolean);
end;
implementation
uses
MandelScreen, MandelOptions;
constructor TMandelCalc.Create(InitR, InitI, Size, SeedR, SeedI : Extended;
MaxLen, MaxIterate, ParmStep : integer;
FracJulia, dspAttract, dspMono : boolean);
begin
XStep := ParmStep;
FreeOnTerminate := True;
Priority := tpTimeCritical;
inherited Create(False);
end;
procedure TMandelCalc.Execute;
var
R, I, Step : Extended;
CountX, CountY : integer;
function Calculate(R0, I0: Extended):integer;
const
RequiredRep = 1;
var
Iterate : integer;
R1, I1, R2, I2 : Extended;
LastR, LastI : Extended;
CheckEvery, Periodicity, LastPeriod, NumRep : integer;
procedure CheckAttractor;
begin
if (abs(R1 - LastR) < Step) and (abs(I1 - LastI) < Step) then
begin
if LastPeriod = Periodicity then
begin
NumRep := NumRep + 1;
if NumRep = RequiredRep then
begin
if dspAttract then
Colour := Iterate;
Iterate := MaxIterate + 1;
end
end
else
begin
LastPeriod := Periodicity;
Periodicity := 1;
end
end
else
begin
Periodicity := Periodicity + 1;
if Periodicity >= CheckEvery then
begin
CheckEvery := CheckEvery * 2;
Periodicity := 1;
LastR := R1;
LastI := I1;
NumRep := 0;
end;
end;
end;
begin
Iterate := 1;
R1 := R0;
I1 := I0;
if FracJulia then
begin
R0 := SeedR;
I0 := SeedI;
end;
LastR := 0;
LastI := 0;
NumRep := 0;
Periodicity := 1;
LastPeriod := 2;
CheckEvery := 2;
Colour := 0;
while (sqr(R1) + sqr(I1) < 4) and (Iterate <= MaxIterate) do
begin
Iterate := Iterate + 1;
R2 := sqr(R1) - sqr(I1) + R0;
I2 := 2 * R1 * I1 + I0;
R1 := R2;
I1 := I2;
{if (not FracJulia) or dspAttract then} CheckAttractor;
end;
if Iterate > MaxIterate then
Iterate := 0;
if (Colour = 0) and not dspAttract then
Colour := Iterate;
if Colour = 0 then
Result := OptionsForm.ColourSet
else
begin
if dspMono then
Result := (Colour mod 2) * $FFFFFF
else
Result := OptionsForm.CalcColour(Colour);
end;
end;
begin
Focus := MaxLen - 1;
{ Focus := 1; }
repeat
Len := MaxLen div (Focus + 1);
Step := Size / (Focus + 1);
CountX := Focus div 2;
while (CountX <= Focus) and (CountX >= 0) do
begin
X := CountX * Len;
R := InitR + (CountX * Step);
for CountY := 0 to Focus do
begin
colPoints[CountY] := -1;
{ if ((CountX mod 2) + (CountY mod 2) <> 0)
or ((CountX = 0) and (CountY = 0)) then }
begin
Y := CountY * Len;
I := InitI - (CountY * Step);
Colour := Calculate(R, I);
ColPoints[CountY] := Colour;
end;
end;
if MandelScreen.StopThread then
exit;
synchronize(Synchro);
CountX := CountX + XStep;
end;
Focus := (Focus * 2) + 1;
until Focus > MaxLen;
end;
procedure TMandelCalc.Synchro;
var
LoopY : integer;
begin
for LoopY := 0 to Focus do
begin
if ColPoints[LoopY] <> -1 then
begin
Y := LoopY * Len;
if Len > 1 then
begin
DrawRect := Rect(X, Y, X + Len, Y + Len);
with MandelScreen.Bitmap.Canvas do
begin
Brush.Color := ColPoints[LoopY];
FillRect(DrawRect);
end;
end
else
begin
MandelScreen.Bitmap.Canvas.Pixels[X,Y] := ColPoints[LoopY];
end;
end;
end;
DrawRect := Rect(X, 0, X + Len, MaxLen);
frmMandelbrot.imgMandel.Canvas.CopyRect(DrawRect,MandelScreen.Bitmap.Canvas,DrawRect);
end;
end.
JPaul
03-30-2007, 03:39 PM
Spammer
Barbarossa
03-30-2007, 03:43 PM
Where? Let me at 'em :angry:
manker
03-30-2007, 03:55 PM
For the love of Chebus' cowgina - use your newly acquired modular powars and move this fuck forsaken thread to interweb-world.
I just had a look, and converting that program to do them non-square would be teh hard :(
Mainly because it would fuck up all the co-ordinates and that when you select the next image to draw. :idunno:
Anyway, attached is the version that should work for you without the errors.
If you're interested, here is the source for the drawing algorithm :wacko:
unit MandelCalc;
interface
uses
Windows, Classes, Graphics, SysUtils;
type
TMandelCalc = class(TThread)
private
{ Private declarations }
X, Y, Len, Colour, Focus, XStep : integer;
DrawRect : TRect;
ColPoints : Array [0..1023] of integer;
procedure Synchro;
protected
procedure Execute; override;
public
{ Public declarations }
constructor Create(InitR, InitI, Size, SeedR, SeedI : Extended;
MaxLen, MaxIterate, ParmStep : integer;
FracJulia, dspAttract, dspMono : boolean);
end;
implementation
uses
MandelScreen, MandelOptions;
constructor TMandelCalc.Create(InitR, InitI, Size, SeedR, SeedI : Extended;
MaxLen, MaxIterate, ParmStep : integer;
FracJulia, dspAttract, dspMono : boolean);
begin
XStep := ParmStep;
FreeOnTerminate := True;
Priority := tpTimeCritical;
inherited Create(False);
end;
procedure TMandelCalc.Execute;
var
R, I, Step : Extended;
CountX, CountY : integer;
function Calculate(R0, I0: Extended):integer;
const
RequiredRep = 1;
var
Iterate : integer;
R1, I1, R2, I2 : Extended;
LastR, LastI : Extended;
CheckEvery, Periodicity, LastPeriod, NumRep : integer;
procedure CheckAttractor;
begin
if (abs(R1 - LastR) < Step) and (abs(I1 - LastI) < Step) then
begin
if LastPeriod = Periodicity then
begin
NumRep := NumRep + 1;
if NumRep = RequiredRep then
begin
if dspAttract then
Colour := Iterate;
Iterate := MaxIterate + 1;
end
end
else
begin
LastPeriod := Periodicity;
Periodicity := 1;
end
end
else
begin
Periodicity := Periodicity + 1;
if Periodicity >= CheckEvery then
begin
CheckEvery := CheckEvery * 2;
Periodicity := 1;
LastR := R1;
LastI := I1;
NumRep := 0;
end;
end;
end;
begin
Iterate := 1;
R1 := R0;
I1 := I0;
if FracJulia then
begin
R0 := SeedR;
I0 := SeedI;
end;
LastR := 0;
LastI := 0;
NumRep := 0;
Periodicity := 1;
LastPeriod := 2;
CheckEvery := 2;
Colour := 0;
while (sqr(R1) + sqr(I1) < 4) and (Iterate <= MaxIterate) do
begin
Iterate := Iterate + 1;
R2 := sqr(R1) - sqr(I1) + R0;
I2 := 2 * R1 * I1 + I0;
R1 := R2;
I1 := I2;
{if (not FracJulia) or dspAttract then} CheckAttractor;
end;
if Iterate > MaxIterate then
Iterate := 0;
if (Colour = 0) and not dspAttract then
Colour := Iterate;
if Colour = 0 then
Result := OptionsForm.ColourSet
else
begin
if dspMono then
Result := (Colour mod 2) * $FFFFFF
else
Result := OptionsForm.CalcColour(Colour);
end;
end;
begin
Focus := MaxLen - 1;
{ Focus := 1; }
repeat
Len := MaxLen div (Focus + 1);
Step := Size / (Focus + 1);
CountX := Focus div 2;
while (CountX <= Focus) and (CountX >= 0) do
begin
X := CountX * Len;
R := InitR + (CountX * Step);
for CountY := 0 to Focus do
begin
colPoints[CountY] := -1;
{ if ((CountX mod 2) + (CountY mod 2) <> 0)
or ((CountX = 0) and (CountY = 0)) then }
begin
Y := CountY * Len;
I := InitI - (CountY * Step);
Colour := Calculate(R, I);
ColPoints[CountY] := Colour;
end;
end;
if MandelScreen.StopThread then
exit;
synchronize(Synchro);
CountX := CountX + XStep;
end;
Focus := (Focus * 2) + 1;
until Focus > MaxLen;
end;
procedure TMandelCalc.Synchro;
var
LoopY : integer;
begin
for LoopY := 0 to Focus do
begin
if ColPoints[LoopY] <> -1 then
begin
Y := LoopY * Len;
if Len > 1 then
begin
DrawRect := Rect(X, Y, X + Len, Y + Len);
with MandelScreen.Bitmap.Canvas do
begin
Brush.Color := ColPoints[LoopY];
FillRect(DrawRect);
end;
end
else
begin
MandelScreen.Bitmap.Canvas.Pixels[X,Y] := ColPoints[LoopY];
end;
end;
end;
DrawRect := Rect(X, 0, X + Len, MaxLen);
frmMandelbrot.imgMandel.Canvas.CopyRect(DrawRect,MandelScreen.Bitmap.Canvas,DrawRect);
end;
end.
That code is kewlness, I'll have to install delphi again and mess around with it at some point :pinch: I didn't reinstall it after my last format :dabs:
I was looking at mandelbrot-equations yesterday for a bit after you started talking about them, and it seems kewl. Tho' I think I need to brush up on my math.
EDit: do tell me if you sort out the sides, but don't feel like you have to.
EDitII: just upping the rez to like 1280*1280, or more would be sweet too.
Powered by vBulletin® Version 4.2.3 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.