Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

I can't drive 55. I'm looking forward to not being able to drive 65, either.


devel / comp.lang.fortran / Re: The color of lies

SubjectAuthor
* The color of liesJames Van Buskirk
+* Re: The color of liesgah4
|`- Re: The color of liesArjen Markus
`* Re: The color of liesgah4
 +* Re: The color of liesJohn
 |`- Re: The color of liesgah4
 +* Re: The color of liesRobin Vowels
 |`* Re: The color of liesgah4
 | `- Re: The color of liesRobin Vowels
 `* Re: The color of liesArjen Markus
  +* Re: The color of liesgah4
  |`* Re: The color of liesCyrmag
  | `* Re: The color of liesgah4
  |  `* Re: The color of liesJohn
  |   +* Re: The color of liesJohn
  |   |`* Re: The color of liesCyrmag
  |   | `* Re: The color of liesJohn
  |   |  `- Re: The color of liesArjen Markus
  |   `- Re: The color of liesJohn
  `* Re: The color of liesArjen Markus
   `* Re: The color of liesLouis Krupp
    `* Re: The color of liesArjen Markus
     `- Re: The color of liesArjen Markus

1
The color of lies

<ten1c0$1o89m$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2817&group=comp.lang.fortran#2817

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: not_valid@comcast.net (James Van Buskirk)
Newsgroups: comp.lang.fortran
Subject: The color of lies
Date: Wed, 31 Aug 2022 01:07:14 -0600
Organization: A noiseless patient Spider
Lines: 2
Message-ID: <ten1c0$1o89m$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain;
format=flowed;
charset="iso-8859-1";
reply-type=original
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 31 Aug 2022 07:07:45 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="ebb668836cbd5b4ab3e2335177edafba";
logging-data="1843510"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19SKZ7Shtsu9IU7VULkptgfyTZveSmCyR8="
Cancel-Lock: sha1:jA44Mygf4AvvwET8jjluz6ISFW0=
X-Priority: 3
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 16.4.3528.331
X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331
X-MSMail-Priority: Normal
 by: James Van Buskirk - Wed, 31 Aug 2022 07:07 UTC

I have always been taught that blue is the color of lies because you
have fewer cones sensitive to blue so that you don't get as clear a
picture in blue as in red or green. So here is a Fortran program that
permits testing. It spits out 4 images, in red, green, blue, and gray
in *.PPM format, which is about the simplest image format possible.
Unfortunately, the only software I have that can open *.PPM files
is gimp, which is free. Gimp can also export to other, more common
formats.

program lies
use ISO_FORTRAN_ENV
implicit none
integer iunit
integer i, j, k
character(9):: filename(4)=[character(9)::'red.PPM','green.PPM', &
'blue.PPM','gray.PPM']
integer:: color(3,4)=reshape([1,0,0,0,1,0,0,0,1,1,1,1],[3,4])
do i = 1, 4
open(newunit=iunit,file=filename(i),status='replace', &
access='stream')
write(iunit) 'P6 3840 2160 255 '
write(iunit) ((int((j-1)/15*color(:,i),INT8),j=1,3840),k=1,2160)
close(iunit)
end do
end program lies

In which color is it easiest to identify the changes in intensity? In
which is it the most difficult, i.e., the color of lies?

Not really all that Fortran-related, but I was surprised how brief
a program can be that creates these UHD images.

Re: The color of lies

<80bc9436-d3f8-4149-9382-79821f21c2ddn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2818&group=comp.lang.fortran#2818

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:1453:b0:344:5909:ba44 with SMTP id v19-20020a05622a145300b003445909ba44mr17656621qtx.132.1661933017750;
Wed, 31 Aug 2022 01:03:37 -0700 (PDT)
X-Received: by 2002:a81:f47:0:b0:31f:434b:5ee with SMTP id 68-20020a810f47000000b0031f434b05eemr17129822ywp.383.1661933017602;
Wed, 31 Aug 2022 01:03:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Wed, 31 Aug 2022 01:03:37 -0700 (PDT)
In-Reply-To: <ten1c0$1o89m$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:4ccc:f497:69ae:edab;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:4ccc:f497:69ae:edab
References: <ten1c0$1o89m$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <80bc9436-d3f8-4149-9382-79821f21c2ddn@googlegroups.com>
Subject: Re: The color of lies
From: gah4@u.washington.edu (gah4)
Injection-Date: Wed, 31 Aug 2022 08:03:37 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3134
 by: gah4 - Wed, 31 Aug 2022 08:03 UTC

On Wednesday, August 31, 2022 at 12:07:49 AM UTC-7, James Van Buskirk wrote:
> I have always been taught that blue is the color of lies because you
> have fewer cones sensitive to blue so that you don't get as clear a
> picture in blue as in red or green.

It isn't Fortran, but I wrote this one some years ago. It generates PostScript
directly, easy to print.

For each pixel in the output image, it computes a complex cube root.

I have thought about doing the whole calculation in PS, but didn't do that yet.

#include <stdio.h>
#include <math.h>

#define MULT(x,y,a,b,t) ((t)=(x)*(a)-(y)*(b),(y)=(x)*(b)+(y)*(a),(x)=(t))
#define DIV(x,y,a,b,t) (MULT(x,y,a,-b,t),x /= SQ(a,b),y /= SQ(a,b))
#define SQ(x,y) ((x)*(x)+(y)*(y))
#define pi 3.141592654
#define R 150

#define CONST 1.905e-3
#define ROWS 900
#define COLS 900
#define R2 .16

main() {
double x,y,zr,zi,wr,wi,dr,di,angle,t;
int i,j,gray,ix,iy;
static char dots[]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};
static char *ps[]={"%%!\n",
"/str 256 string def\n",
"/go { image showpage } def\n",
"0 720 translate 72 72 scale\n",
"%d %d 8 [%d 0 0 -%d 0 %d]\n",
"{currentfile str readhexstring pop}\n",
"go\n"};

for(i=0;i<sizeof(ps)/sizeof(char*);i++) printf(ps[i],ROWS,COLS,R,R,R);

j=0;
for(ix=-ROWS/2;ix<ROWS-ROWS/2;ix++)
for(iy=-COLS/2;iy<COLS-COLS/2;iy++) {
zr=ix*CONST;
zi=iy*CONST;
gray=65535;
for(i=1;i<=224;i++) {
wr=zr,wi=zi;
MULT(wr,wi,zr,zi,t);
MULT(zr,zi,wr,wi,t);
zr *=2, zi *= 2;
zr += 1;
DIV(zr,zi,wr,wi,t);
zr /= 3; zi /= 3;
dr=zr-1,di=zi;
if(SQ(dr,di)<R2) break;
dr=zr+0.5,di=zi+0.866;
if(SQ(dr,di)<R2) break;
dr=zr+0.5,di=zi-0.866;
if(SQ(dr,di)<R2) break;
}
if(i>224) angle=atan2(0.,-1.);
else angle=atan2(di,dr);
#if 0
fprintf(stderr,"%d %d %f %d\n",ix,iy,angle,i);
#endif
printf("%02x",(int)(fabs(angle)/.012272));
if(++j%30==0) putchar('\n');
}
}

Re: The color of lies

<45d7ea95-3bb2-421f-bd2f-67efdfb7891an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2819&group=comp.lang.fortran#2819

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:2601:b0:6bc:70bb:c56b with SMTP id z1-20020a05620a260100b006bc70bbc56bmr15598369qko.416.1661945144113;
Wed, 31 Aug 2022 04:25:44 -0700 (PDT)
X-Received: by 2002:a25:8a85:0:b0:671:715e:a1b0 with SMTP id
h5-20020a258a85000000b00671715ea1b0mr14324766ybl.98.1661945143688; Wed, 31
Aug 2022 04:25:43 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Wed, 31 Aug 2022 04:25:43 -0700 (PDT)
In-Reply-To: <80bc9436-d3f8-4149-9382-79821f21c2ddn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=136.231.213.13; posting-account=A91wAAoAAADgBUxBX6QqsrSD26GLhVp8
NNTP-Posting-Host: 136.231.213.13
References: <ten1c0$1o89m$1@dont-email.me> <80bc9436-d3f8-4149-9382-79821f21c2ddn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <45d7ea95-3bb2-421f-bd2f-67efdfb7891an@googlegroups.com>
Subject: Re: The color of lies
From: arjen.markus895@gmail.com (Arjen Markus)
Injection-Date: Wed, 31 Aug 2022 11:25:44 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1595
 by: Arjen Markus - Wed, 31 Aug 2022 11:25 UTC

Well, this isn't Fortran either, but the Tcl program below displays part of the PPM files (my screen is too small to show it all):

# viewppm.tcl --
# View a PPM file
# pack [canvas .c -bg white]

set image [image create photo -file green.PPM]

..c create image 0 0 -image $image -anchor c

I use an anchor "central" because at first I only saw the top-left, which looks like a uniform black rectangle.

Regards,

Arjen

Re: The color of lies

<5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2820&group=comp.lang.fortran#2820

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:1986:b0:343:225d:f9e1 with SMTP id u6-20020a05622a198600b00343225df9e1mr21326460qtc.651.1661983941036;
Wed, 31 Aug 2022 15:12:21 -0700 (PDT)
X-Received: by 2002:a81:7cc3:0:b0:336:e83b:51fd with SMTP id
x186-20020a817cc3000000b00336e83b51fdmr20665066ywc.457.1661983940857; Wed, 31
Aug 2022 15:12:20 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Wed, 31 Aug 2022 15:12:20 -0700 (PDT)
In-Reply-To: <ten1c0$1o89m$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:c4b3:e256:38a2:a798;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:c4b3:e256:38a2:a798
References: <ten1c0$1o89m$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
Subject: Re: The color of lies
From: gah4@u.washington.edu (gah4)
Injection-Date: Wed, 31 Aug 2022 22:12:21 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2962
 by: gah4 - Wed, 31 Aug 2022 22:12 UTC

On Wednesday, August 31, 2022 at 12:07:49 AM UTC-7, James Van Buskirk wrote:
> I have always been taught that blue is the color of lies because you
> have fewer cones sensitive to blue so that you don't get as clear a
> picture in blue as in red or green.

OK, here it is in Fortran. The original was before C had complex,
and it looks much nicer with complex variables.
(Note that it is fixed form, and many news readers lose leading blanks.)

PROGRAM ROOT3
REAL*8 PI/3.141592653589793/, CONST/1.905E-3/, R2R/.4/
INTEGER ROWS/900/, COLS/900/, R/150/
REAL*8 ANGLE
COMPLEX*16 Z, W, D
INTEGER I, J, GRAY, IX, IY
CHARACTER*50 PS(7)
DATA PS/"%!",
* "/str 256 string def",
* "/go { image showpage } def",
* "0 720 translate 72 72 scale",
* "(I6, I6, ' 8 [', I6, ' 0 0 ', I6, ' 0 ', I6, ']')",
* "{currentfile str readhexstring pop}",
* "go"/
DO I=1,4
WRITE(*,'(A)') PS(I)
END DO
WRITE(*,PS(5)) ROWS, COLS, R, -R, R
DO I=6,7
WRITE(*,'(A)') PS(I)
END DO

DO IX=-ROWS/2, ROWS-ROWS/2-1
DO IY=-COLS/2, COLS-COLS/2-1
Z=CMPLX(IX*CONST, IY*CONST, KIND(1.D0))
DO I=1,224
W=Z*Z
Z=Z*W*2+1
Z=Z/W/3
D=Z-1
IF(ABS(D)<R2R) EXIT
D=Z+CMPLX(0.5D0, 0.866D0, KIND(1.D0))
IF(ABS(D)<R2R) EXIT
D=Z+CMPLX(0.5D0, -0.866D0, KIND(1.D0))
IF(ABS(D)<R2R) EXIT
END DO
IF(I>224) THEN
ANGLE=ATAN2(0.,1.)
ELSE
ANGLE=ATAN2(AIMAG(D), REAL(D))
ENDIF
WRITE(*,'(Z2)') INT(ABS(ANGLE/0.012272))
END DO
END DO
END

Re: The color of lies

<c50efc38-847d-4912-ac7a-7c9502336526n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2821&group=comp.lang.fortran#2821

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:1a07:b0:6bc:3aa1:90fb with SMTP id bk7-20020a05620a1a0700b006bc3aa190fbmr18000229qkb.292.1662001150659;
Wed, 31 Aug 2022 19:59:10 -0700 (PDT)
X-Received: by 2002:a81:e0a:0:b0:31e:2180:2b39 with SMTP id
10-20020a810e0a000000b0031e21802b39mr20845326ywo.319.1662001150404; Wed, 31
Aug 2022 19:59:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Wed, 31 Aug 2022 19:59:10 -0700 (PDT)
In-Reply-To: <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:546:300:4c20:3cd2:5145:e365:fef8;
posting-account=7tVJUQoAAACymEG6aShD5R0lhHCm_A0r
NNTP-Posting-Host: 2601:546:300:4c20:3cd2:5145:e365:fef8
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c50efc38-847d-4912-ac7a-7c9502336526n@googlegroups.com>
Subject: Re: The color of lies
From: urbanjost@comcast.net (John)
Injection-Date: Thu, 01 Sep 2022 02:59:10 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1426
 by: John - Thu, 1 Sep 2022 02:59 UTC

The beauty that can emerge from math can be startling. Nice image.
It was fun playing with the formula and seeing the different results.
Just a note that to work in my programming environment I had to change
the Z2 format to Z2.2.

Re: The color of lies

<0cff69fe-5b86-4b8d-a310-977874266ba9n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2822&group=comp.lang.fortran#2822

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:1895:b0:344:f8dc:d070 with SMTP id v21-20020a05622a189500b00344f8dcd070mr22247891qtc.416.1662013425192;
Wed, 31 Aug 2022 23:23:45 -0700 (PDT)
X-Received: by 2002:a0d:cad7:0:b0:33f:57a8:9d03 with SMTP id
m206-20020a0dcad7000000b0033f57a89d03mr20892697ywd.105.1662013424815; Wed, 31
Aug 2022 23:23:44 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Wed, 31 Aug 2022 23:23:44 -0700 (PDT)
In-Reply-To: <c50efc38-847d-4912-ac7a-7c9502336526n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:c4b3:e256:38a2:a798;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:c4b3:e256:38a2:a798
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<c50efc38-847d-4912-ac7a-7c9502336526n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0cff69fe-5b86-4b8d-a310-977874266ba9n@googlegroups.com>
Subject: Re: The color of lies
From: gah4@u.washington.edu (gah4)
Injection-Date: Thu, 01 Sep 2022 06:23:45 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1890
 by: gah4 - Thu, 1 Sep 2022 06:23 UTC

On Wednesday, August 31, 2022 at 7:59:12 PM UTC-7, John wrote:
> The beauty that can emerge from math can be startling. Nice image.
> It was fun playing with the formula and seeing the different results.
> Just a note that to work in my programming environment I had to change
> the Z2 format to Z2.2.

The C version writes 60 hex digits per line, but it isn't so easy to do in Fortran.
Could be done with non-advancing I/O, but I did try that. PostScript doesn't care.

And yes, it does need Z2.2. I was testing different things before posting,
and didn't get that one. I am used to %02x, but not so used to that one.

Re: The color of lies

<6247fe1d-abae-4533-bbb4-140ac55cbfb8n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2823&group=comp.lang.fortran#2823

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:290d:b0:6b5:cecc:1cab with SMTP id m13-20020a05620a290d00b006b5cecc1cabmr17741065qkp.465.1662014974110;
Wed, 31 Aug 2022 23:49:34 -0700 (PDT)
X-Received: by 2002:a25:d046:0:b0:695:cef7:4f2c with SMTP id
h67-20020a25d046000000b00695cef74f2cmr18022526ybg.245.1662014973860; Wed, 31
Aug 2022 23:49:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Wed, 31 Aug 2022 23:49:33 -0700 (PDT)
In-Reply-To: <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=202.67.103.232; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le
NNTP-Posting-Host: 202.67.103.232
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6247fe1d-abae-4533-bbb4-140ac55cbfb8n@googlegroups.com>
Subject: Re: The color of lies
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Thu, 01 Sep 2022 06:49:34 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3016
 by: Robin Vowels - Thu, 1 Sep 2022 06:49 UTC

On Thursday, September 1, 2022 at 8:12:22 AM UTC+10, gah4 wrote:
> On Wednesday, August 31, 2022 at 12:07:49 AM UTC-7, James Van Buskirk wrote:
> > I have always been taught that blue is the color of lies because you
> > have fewer cones sensitive to blue so that you don't get as clear a
> > picture in blue as in red or green.
> OK, here it is in Fortran. The original was before C had complex,
> and it looks much nicer with complex variables.
> (Note that it is fixed form, and many news readers lose leading blanks.)
>
> PROGRAM ROOT3
> REAL*8 PI/3.141592653589793/, CONST/1.905E-3/, R2R/.4/

Why is it that experienced programmers still get this wrong
after 50 years? All those constants need D0, D-3, D0 respectively.
You should use a decent language -- PL/I.

What's more, REAL*8 is non-standard Fortran.

> INTEGER ROWS/900/, COLS/900/, R/150/
> REAL*8 ANGLE
> COMPLEX*16 Z, W, D
> INTEGER I, J, GRAY, IX, IY
> CHARACTER*50 PS(7)
> DATA PS/"%!",
> * "/str 256 string def",
> * "/go { image showpage } def",
> * "0 720 translate 72 72 scale",
> * "(I6, I6, ' 8 [', I6, ' 0 0 ', I6, ' 0 ', I6, ']')",
> * "{currentfile str readhexstring pop}",
> * "go"/
> DO I=1,4
> WRITE(*,'(A)') PS(I)
> END DO
> WRITE(*,PS(5)) ROWS, COLS, R, -R, R
> DO I=6,7
> WRITE(*,'(A)') PS(I)
> END DO
>
> DO IX=-ROWS/2, ROWS-ROWS/2-1
> DO IY=-COLS/2, COLS-COLS/2-1
> Z=CMPLX(IX*CONST, IY*CONST, KIND(1.D0))
> DO I=1,224
> W=Z*Z
> Z=Z*W*2+1
> Z=Z/W/3
> D=Z-1
> IF(ABS(D)<R2R) EXIT
> D=Z+CMPLX(0.5D0, 0.866D0, KIND(1.D0))
> IF(ABS(D)<R2R) EXIT
> D=Z+CMPLX(0.5D0, -0.866D0, KIND(1.D0))
> IF(ABS(D)<R2R) EXIT
> END DO
> IF(I>224) THEN
> ANGLE=ATAN2(0.,1.)
> ELSE
> ANGLE=ATAN2(AIMAG(D), REAL(D))
> ENDIF
> WRITE(*,'(Z2)') INT(ABS(ANGLE/0.012272))
> END DO
> END DO
> END

Re: The color of lies

<fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2825&group=comp.lang.fortran#2825

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:408d:b0:6be:9243:e6b3 with SMTP id f13-20020a05620a408d00b006be9243e6b3mr10730268qko.518.1662021570518;
Thu, 01 Sep 2022 01:39:30 -0700 (PDT)
X-Received: by 2002:a0d:e083:0:b0:343:2928:867f with SMTP id
j125-20020a0de083000000b003432928867fmr4894793ywe.467.1662021570241; Thu, 01
Sep 2022 01:39:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 1 Sep 2022 01:39:30 -0700 (PDT)
In-Reply-To: <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=62.194.189.128; posting-account=A91wAAoAAADgBUxBX6QqsrSD26GLhVp8
NNTP-Posting-Host: 62.194.189.128
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com>
Subject: Re: The color of lies
From: arjen.markus895@gmail.com (Arjen Markus)
Injection-Date: Thu, 01 Sep 2022 08:39:30 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2059
 by: Arjen Markus - Thu, 1 Sep 2022 08:39 UTC

On Thursday, September 1, 2022 at 12:12:22 AM UTC+2, gah4 wrote:
> On Wednesday, August 31, 2022 at 12:07:49 AM UTC-7, James Van Buskirk wrote:
> > I have always been taught that blue is the color of lies because you
> > have fewer cones sensitive to blue so that you don't get as clear a
> > picture in blue as in red or green.
> OK, here it is in Fortran. The original was before C had complex,
> and it looks much nicer with complex variables.
> (Note that it is fixed form, and many news readers lose leading blanks.)
>

I tried to view the result of this Fortran program with ghostscript and got rubbish. I also tried the result of the C program and that showed the picture I expected. So there is something different, possibly caused by the formatting. But I am no expert in PostScript.

Regards,

Arjen

Re: The color of lies

<ca35f72c-94df-4919-ae9b-db1e50631dbbn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2826&group=comp.lang.fortran#2826

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:40d4:b0:6bb:11fc:120f with SMTP id g20-20020a05620a40d400b006bb11fc120fmr18892069qko.659.1662021948712;
Thu, 01 Sep 2022 01:45:48 -0700 (PDT)
X-Received: by 2002:a81:7cc3:0:b0:336:e83b:51fd with SMTP id
x186-20020a817cc3000000b00336e83b51fdmr22379924ywc.457.1662021948524; Thu, 01
Sep 2022 01:45:48 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 1 Sep 2022 01:45:48 -0700 (PDT)
In-Reply-To: <6247fe1d-abae-4533-bbb4-140ac55cbfb8n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:c4b3:e256:38a2:a798;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:c4b3:e256:38a2:a798
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<6247fe1d-abae-4533-bbb4-140ac55cbfb8n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ca35f72c-94df-4919-ae9b-db1e50631dbbn@googlegroups.com>
Subject: Re: The color of lies
From: gah4@u.washington.edu (gah4)
Injection-Date: Thu, 01 Sep 2022 08:45:48 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1887
 by: gah4 - Thu, 1 Sep 2022 08:45 UTC

On Wednesday, August 31, 2022 at 11:49:35 PM UTC-7, Robin Vowels wrote:

(snip)

> > REAL*8 PI/3.141592653589793/, CONST/1.905E-3/, R2R/.4/
> Why is it that experienced programmers still get this wrong
> after 50 years? All those constants need D0, D-3, D0 respectively.

They really don't, and even more probably don't need to be REAL*8.

Especially as PI isn't even used in the program!

In the end, the program converts an angle to a gray level from 0 to 255,
which the printer likely converts to a coarser gray level.

CONST relates to the scale of the image, which also doesn't need
to be very exact.

Re: The color of lies

<4dedec21-2691-4eac-946a-0e08cad97e57n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2827&group=comp.lang.fortran#2827

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:1ba4:b0:344:57a4:7f4c with SMTP id bp36-20020a05622a1ba400b0034457a47f4cmr22401858qtb.146.1662022648351;
Thu, 01 Sep 2022 01:57:28 -0700 (PDT)
X-Received: by 2002:a25:cd81:0:b0:690:47f:f57a with SMTP id
d123-20020a25cd81000000b00690047ff57amr19525947ybf.238.1662022648201; Thu, 01
Sep 2022 01:57:28 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 1 Sep 2022 01:57:27 -0700 (PDT)
In-Reply-To: <fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:c4b3:e256:38a2:a798;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:c4b3:e256:38a2:a798
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4dedec21-2691-4eac-946a-0e08cad97e57n@googlegroups.com>
Subject: Re: The color of lies
From: gah4@u.washington.edu (gah4)
Injection-Date: Thu, 01 Sep 2022 08:57:28 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1893
 by: gah4 - Thu, 1 Sep 2022 08:57 UTC

On Thursday, September 1, 2022 at 1:39:32 AM UTC-7, arjen.m...@gmail.com wrote:

(snip)

> I tried to view the result of this Fortran program with ghostscript and got rubbish.
> I also tried the result of the C program and that showed the picture I expected.
> So there is something different, possibly caused by the formatting.
> But I am no expert in PostScript.

Yes, as John noted the format should be Z2.2.

It is not so obvious, but PS reads the hex characters ignoring any other characters.

With Z2 it blank pads, so only one digit. Z2.2 zero pads, so it works.
The C program uses %02x, which also zero pads.

Re: The color of lies

<f66eb43f-deff-4bfb-bf58-c2bd4fc38cc7n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2830&group=comp.lang.fortran#2830

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ad4:5f06:0:b0:498:fe4f:a657 with SMTP id fo6-20020ad45f06000000b00498fe4fa657mr18065533qvb.22.1662026350635;
Thu, 01 Sep 2022 02:59:10 -0700 (PDT)
X-Received: by 2002:a25:ba91:0:b0:683:ebc2:7114 with SMTP id
s17-20020a25ba91000000b00683ebc27114mr19235753ybg.319.1662026350437; Thu, 01
Sep 2022 02:59:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 1 Sep 2022 02:59:10 -0700 (PDT)
In-Reply-To: <ca35f72c-94df-4919-ae9b-db1e50631dbbn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=202.67.103.232; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le
NNTP-Posting-Host: 202.67.103.232
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<6247fe1d-abae-4533-bbb4-140ac55cbfb8n@googlegroups.com> <ca35f72c-94df-4919-ae9b-db1e50631dbbn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f66eb43f-deff-4bfb-bf58-c2bd4fc38cc7n@googlegroups.com>
Subject: Re: The color of lies
From: robin.vowels@gmail.com (Robin Vowels)
Injection-Date: Thu, 01 Sep 2022 09:59:10 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2048
 by: Robin Vowels - Thu, 1 Sep 2022 09:59 UTC

On Thursday, September 1, 2022 at 6:45:50 PM UTC+10, gah4 wrote:
> On Wednesday, August 31, 2022 at 11:49:35 PM UTC-7, Robin Vowels wrote:
>
> (snip)
> > > REAL*8 PI/3.141592653589793/, CONST/1.905E-3/, R2R/.4/
> > Why is it that experienced programmers still get this wrong
> > after 50 years? All those constants need D0, D-3, D0 respectively.
> They really don't, and even more probably don't need to be REAL*8.
..
It's sloppy programming, and a bad example for others.
..
> Especially as PI isn't even used in the program!
>
> In the end, the program converts an angle to a gray level from 0 to 255,
> which the printer likely converts to a coarser gray level.
>
> CONST relates to the scale of the image, which also doesn't need
> to be very exact.

Re: The color of lies

<teq577$25t0e$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2831&group=comp.lang.fortran#2831

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: cyrmag7@gmail.com (Cyrmag)
Newsgroups: comp.lang.fortran
Subject: Re: The color of lies
Date: Thu, 1 Sep 2022 06:31:48 -0500
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <teq577$25t0e$1@dont-email.me>
References: <ten1c0$1o89m$1@dont-email.me>
<5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com>
<4dedec21-2691-4eac-946a-0e08cad97e57n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 1 Sep 2022 11:31:51 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="1d234d6159329dff52046b184427849a";
logging-data="2290702"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vrmCLJTTFbb4cPEvxQ4ro"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.13.0
Cancel-Lock: sha1:fVMxRWQ8nTqCC/ftWLS5GDcMLqA=
Content-Language: en-US
In-Reply-To: <4dedec21-2691-4eac-946a-0e08cad97e57n@googlegroups.com>
 by: Cyrmag - Thu, 1 Sep 2022 11:31 UTC

On 9/1/2022 3:57 AM, gah4 wrote:
> On Thursday, September 1, 2022 at 1:39:32 AM UTC-7, arjen.m...@gmail.com wrote:
>
> (snip)
>
>> I tried to view the result of this Fortran program with ghostscript and got rubbish.
>> I also tried the result of the C program and that showed the picture I expected.
>> So there is something different, possibly caused by the formatting.
>> But I am no expert in PostScript.
>
> Yes, as John noted the format should be Z2.2.
>
> It is not so obvious, but PS reads the hex characters ignoring any other characters.
>
> With Z2 it blank pads, so only one digit. Z2.2 zero pads, so it works.
> The C program uses %02x, which also zero pads.
>
>

Another tiny correction to the program:

When ix = iy = 0, the statement

Z=Z/W/3

causes division of complex zero by complex zero to occur. With some
Fortran compilers, this might result in '**' to be printed out
instead of two hex digits; in that case, a Postscript interpreter
may abort the display of the image file.

-- CyrMag

Re: The color of lies

<c744105f-9449-42a9-84cf-ad24b476450cn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2834&group=comp.lang.fortran#2834

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:2387:b0:496:c9db:82b0 with SMTP id fw7-20020a056214238700b00496c9db82b0mr26136319qvb.111.1662057858839;
Thu, 01 Sep 2022 11:44:18 -0700 (PDT)
X-Received: by 2002:a05:6902:10ca:b0:671:3616:9147 with SMTP id
w10-20020a05690210ca00b0067136169147mr19620103ybu.105.1662057858648; Thu, 01
Sep 2022 11:44:18 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 1 Sep 2022 11:44:18 -0700 (PDT)
In-Reply-To: <teq577$25t0e$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:db8:19b3:3c53:24e;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:db8:19b3:3c53:24e
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com> <4dedec21-2691-4eac-946a-0e08cad97e57n@googlegroups.com>
<teq577$25t0e$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c744105f-9449-42a9-84cf-ad24b476450cn@googlegroups.com>
Subject: Re: The color of lies
From: gah4@u.washington.edu (gah4)
Injection-Date: Thu, 01 Sep 2022 18:44:18 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2800
 by: gah4 - Thu, 1 Sep 2022 18:44 UTC

On Thursday, September 1, 2022 at 4:31:55 AM UTC-7, CyrMag wrote:
> On 9/1/2022 3:57 AM, gah4 wrote:

(snip)

> > Yes, as John noted the format should be Z2.2.
> > It is not so obvious, but PS reads the hex characters ignoring any other characters.
> > With Z2 it blank pads, so only one digit. Z2.2 zero pads, so it works.
> > The C program uses %02x, which also zero pads.
> Another tiny correction to the program:
> When ix = iy = 0, the statement
> Z=Z/W/3
> causes division of complex zero by complex zero to occur. With some
> Fortran compilers, this might result in '**' to be printed out
> instead of two hex digits; in that case, a Postscript interpreter
> may abort the display of the image file.
I always wondered about the 224 loop, and the test at the end.

It seems that the one case where it happens is the case you mention.
So, angle = atan(1.,0.) = 0, and it works fine.

As well as I know, readhexstring ignores any character that isn't a hex digit.
There would, then, in the case of ** be a one pixel offset for the rest of the
image, which might be noticeable.

Not counting that case, the highest I seems to be 51.

I am not sure now where this is from. I believe I wrote the C program
from a description of the algorithm. I didn't select the 224.

Postscript interpreters I know, if image gives up early, will execute
the showpage and print the image so far. They might not all do that.

Re: The color of lies

<f45208de-7778-4f4d-85df-2fdd551a0c33n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2835&group=comp.lang.fortran#2835

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a0c:e449:0:b0:497:48d8:e4c with SMTP id d9-20020a0ce449000000b0049748d80e4cmr26501741qvm.75.1662066311997;
Thu, 01 Sep 2022 14:05:11 -0700 (PDT)
X-Received: by 2002:a05:6902:10ca:b0:671:3616:9147 with SMTP id
w10-20020a05690210ca00b0067136169147mr20030943ybu.105.1662066311851; Thu, 01
Sep 2022 14:05:11 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 1 Sep 2022 14:05:11 -0700 (PDT)
In-Reply-To: <c744105f-9449-42a9-84cf-ad24b476450cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:546:300:4c20:74a3:8641:f57e:f905;
posting-account=7tVJUQoAAACymEG6aShD5R0lhHCm_A0r
NNTP-Posting-Host: 2601:546:300:4c20:74a3:8641:f57e:f905
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com> <4dedec21-2691-4eac-946a-0e08cad97e57n@googlegroups.com>
<teq577$25t0e$1@dont-email.me> <c744105f-9449-42a9-84cf-ad24b476450cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f45208de-7778-4f4d-85df-2fdd551a0c33n@googlegroups.com>
Subject: Re: The color of lies
From: urbanjost@comcast.net (John)
Injection-Date: Thu, 01 Sep 2022 21:05:11 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4680
 by: John - Thu, 1 Sep 2022 21:05 UTC

Since it came up, hopefully this demonstrates posting in a newsgroup
with indenting ...

On a Linux box with fpm, ps2pdf, and evince I ran it with

fpm run|ps2pdf - >view.pdf;evince view.pdf

If indented four or more characters that line should show as-is, but a ">" is
more reliable for verbatim text.

This is the same program essentially verbatim (hopefully) with the
advance='no' added and the Z values lowercased as I was doing a diff on
the output with the C version. So it was tweeked to write thirty values
per line in lowercase to make that easier, and uses the Z2.2 format,
and shows that (hopefully) newgroup viewers leave lines starting with ">"
as-is, which should retain indenting. Everything else is just cosmetic to
satisfy my personal preferences. It does not address the Z/W/3 issue. Like
the original post (with the Z2.2 format) it worked with gfortran, ifort,
and nvfortran.

> program root3
> integer,parameter :: dp=kind(0.0d0)
> real(kind=dp),parameter :: const=1.905e-3_dp, r2r=0.4e0_dp
> integer,parameter :: rows=900, cols=900, r=150
> real(kind=dp) :: angle
> complex(kind=dp) :: z, w, d
> integer :: i, ix, iy, linebreak
> character(len=2) :: zup
> character(len=60) :: ps(7)=[character(len=60) :: &
> &"%!", &
> & "/str 256 string def", &
> & "/go { image showpage } def", &
> & "0 720 translate 72 72 scale", &
> & "(I0, 1x, I0, ' 8 [', I0, ' 0 0 ', I0, ' 0 ', I0, ']')", &
> & "{currentfile str readhexstring pop}", &
> & "go" ]
> write(*,'(A)') (trim(ps(i)),i=1,4)
> write(*,ps(5)) rows, cols, r, -r, r
> write(*,'(A)')(trim(ps(i)),i=6,7)
> linebreak=0
> do ix=-rows/2, rows-rows/2-1
> do iy=-cols/2, cols-cols/2-1
> z=cmplx(ix*const, iy*const, kind=dp)
> do i=1,224
> w=z*z
> z=z*w*2+1
> z=z/w/3
> d=z-1
> if(abs(d)<r2r) exit
> d=z+cmplx(0.5_dp, 0.866_dp, kind=dp)
> if(abs(d)<r2r) exit
> d=z+cmplx(0.5_dp, -0.866_dp, kind=dp)
> if(abs(d)<r2r) exit
> enddo
> if(i>224) then
> angle=atan2(0.0_dp,1.0_dp)
> else
> angle=atan2(aimag(d), real(d,kind=dp))
> endif
> write(zup,'(Z2.2)') int(abs(angle/0.012272_dp))
> write(*,'(A2)',advance='no') lower(zup)
> linebreak=linebreak+1
> if(linebreak==30)then
> linebreak=0
> write(*,*)
> endif
> enddo
> enddo
> contains
> elemental pure function lower(str) result (string)
> ! ident="@(#) M_strings lower(3f) Changes a string to lowercase
> character(*), intent(in) :: str
> character(len(str)) :: string
> integer :: i
> integer,parameter :: diff = iachar('A')-iachar('a')
> string = str
> ! step thru each letter in the string in specified range
> do concurrent (i = 1:len_trim(str))
> select case (string(i:i))
> case ('A':'Z')
> string(i:i) = char(iachar(str(i:i))-diff) ! change letter to miniscule
> case default
> end select
> enddo
> end function lower
> end program root3

Re: The color of lies

<e5313efb-cbf9-4b38-980b-fa8abce659e3n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2836&group=comp.lang.fortran#2836

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:2548:b0:6b6:113d:34fd with SMTP id s8-20020a05620a254800b006b6113d34fdmr20283890qko.132.1662066608046;
Thu, 01 Sep 2022 14:10:08 -0700 (PDT)
X-Received: by 2002:a81:e0a:0:b0:31e:2180:2b39 with SMTP id
10-20020a810e0a000000b0031e21802b39mr24465835ywo.319.1662066607890; Thu, 01
Sep 2022 14:10:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 1 Sep 2022 14:10:07 -0700 (PDT)
In-Reply-To: <f45208de-7778-4f4d-85df-2fdd551a0c33n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:546:300:4c20:74a3:8641:f57e:f905;
posting-account=7tVJUQoAAACymEG6aShD5R0lhHCm_A0r
NNTP-Posting-Host: 2601:546:300:4c20:74a3:8641:f57e:f905
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com> <4dedec21-2691-4eac-946a-0e08cad97e57n@googlegroups.com>
<teq577$25t0e$1@dont-email.me> <c744105f-9449-42a9-84cf-ad24b476450cn@googlegroups.com>
<f45208de-7778-4f4d-85df-2fdd551a0c33n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e5313efb-cbf9-4b38-980b-fa8abce659e3n@googlegroups.com>
Subject: Re: The color of lies
From: urbanjost@comcast.net (John)
Injection-Date: Thu, 01 Sep 2022 21:10:08 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 0
 by: John - Thu, 1 Sep 2022 21:10 UTC

Well, that worked for a long time, but google groups at least still shows no indenting. Oops. That thing goes out of it's way to mess up any kind of formatting, etc.

Re: The color of lies

<1a75db6d-7f8a-4bb4-b428-25c758225994n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2837&group=comp.lang.fortran#2837

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:389:b0:342:f779:ded8 with SMTP id j9-20020a05622a038900b00342f779ded8mr25371716qtx.111.1662067884121;
Thu, 01 Sep 2022 14:31:24 -0700 (PDT)
X-Received: by 2002:a25:3b04:0:b0:695:dc29:c206 with SMTP id
i4-20020a253b04000000b00695dc29c206mr19862710yba.523.1662067883953; Thu, 01
Sep 2022 14:31:23 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 1 Sep 2022 14:31:23 -0700 (PDT)
In-Reply-To: <f45208de-7778-4f4d-85df-2fdd551a0c33n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:546:300:4c20:74a3:8641:f57e:f905;
posting-account=7tVJUQoAAACymEG6aShD5R0lhHCm_A0r
NNTP-Posting-Host: 2601:546:300:4c20:74a3:8641:f57e:f905
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com> <4dedec21-2691-4eac-946a-0e08cad97e57n@googlegroups.com>
<teq577$25t0e$1@dont-email.me> <c744105f-9449-42a9-84cf-ad24b476450cn@googlegroups.com>
<f45208de-7778-4f4d-85df-2fdd551a0c33n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1a75db6d-7f8a-4bb4-b428-25c758225994n@googlegroups.com>
Subject: Re: The color of lies
From: urbanjost@comcast.net (John)
Injection-Date: Thu, 01 Sep 2022 21:31:24 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4792
 by: John - Thu, 1 Sep 2022 21:31 UTC

On Thursday, September 1, 2022 at 5:05:14 PM UTC-4, John wrote:
> Since it came up, hopefully this demonstrates posting in a newsgroup
> with indenting ...
>
> On a Linux box with fpm, ps2pdf, and evince I ran it with
>
> fpm run|ps2pdf - >view.pdf;evince view.pdf
>
> If indented four or more characters that line should show as-is, but a ">" is
> more reliable for verbatim text.
>
> This is the same program essentially verbatim (hopefully) with the
> advance='no' added and the Z values lowercased as I was doing a diff on
> the output with the C version. So it was tweeked to write thirty values
> per line in lowercase to make that easier, and uses the Z2.2 format,
> and shows that (hopefully) newgroup viewers leave lines starting with ">"
> as-is, which should retain indenting. Everything else is just cosmetic to
> satisfy my personal preferences. It does not address the Z/W/3 issue. Like
> the original post (with the Z2.2 format) it worked with gfortran, ifort,
> and nvfortran.
>
> > program root3
> > integer,parameter :: dp=kind(0.0d0)
> > real(kind=dp),parameter :: const=1.905e-3_dp, r2r=0.4e0_dp
> > integer,parameter :: rows=900, cols=900, r=150
> > real(kind=dp) :: angle
> > complex(kind=dp) :: z, w, d
> > integer :: i, ix, iy, linebreak
> > character(len=2) :: zup
> > character(len=60) :: ps(7)=[character(len=60) :: &
> > &"%!", &
> > & "/str 256 string def", &
> > & "/go { image showpage } def", &
> > & "0 720 translate 72 72 scale", &
> > & "(I0, 1x, I0, ' 8 [', I0, ' 0 0 ', I0, ' 0 ', I0, ']')", &
> > & "{currentfile str readhexstring pop}", &
> > & "go" ]
> > write(*,'(A)') (trim(ps(i)),i=1,4)
> > write(*,ps(5)) rows, cols, r, -r, r
> > write(*,'(A)')(trim(ps(i)),i=6,7)
> > linebreak=0
> > do ix=-rows/2, rows-rows/2-1
> > do iy=-cols/2, cols-cols/2-1
> > z=cmplx(ix*const, iy*const, kind=dp)
> > do i=1,224
> > w=z*z
> > z=z*w*2+1
> > z=z/w/3
> > d=z-1
> > if(abs(d)<r2r) exit
> > d=z+cmplx(0.5_dp, 0.866_dp, kind=dp)
> > if(abs(d)<r2r) exit
> > d=z+cmplx(0.5_dp, -0.866_dp, kind=dp)
> > if(abs(d)<r2r) exit
> > enddo
> > if(i>224) then
> > angle=atan2(0.0_dp,1.0_dp)
> > else
> > angle=atan2(aimag(d), real(d,kind=dp))
> > endif
> > write(zup,'(Z2.2)') int(abs(angle/0.012272_dp))
> > write(*,'(A2)',advance='no') lower(zup)
> > linebreak=linebreak+1
> > if(linebreak==30)then
> > linebreak=0
> > write(*,*)
> > endif
> > enddo
> > enddo
> > contains
> > elemental pure function lower(str) result (string)
> > ! ident="@(#) M_strings lower(3f) Changes a string to lowercase
> > character(*), intent(in) :: str
> > character(len(str)) :: string
> > integer :: i
> > integer,parameter :: diff = iachar('A')-iachar('a')
> > string = str
> > ! step thru each letter in the string in specified range
> > do concurrent (i = 1:len_trim(str))
> > select case (string(i:i))
> > case ('A':'Z')
> > string(i:i) = char(iachar(str(i:i))-diff) ! change letter to miniscule
> > case default
> > end select
> > enddo
> > end function lower
> > end program root3
So doing anything with graphics I think I am going to go with Discourse

https://fortran-lang.discourse.group/t/testing-posting-on-discourse-versus-google-newsgroup/4256

Re: The color of lies

<64706487-1bb0-4150-9f04-79b984fc06a5n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2838&group=comp.lang.fortran#2838

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:6214:2022:b0:497:2c03:61 with SMTP id 2-20020a056214202200b004972c030061mr27829857qvf.11.1662096286331; Thu, 01 Sep 2022 22:24:46 -0700 (PDT)
X-Received: by 2002:a81:8a87:0:b0:333:a706:2734 with SMTP id a129-20020a818a87000000b00333a7062734mr24674267ywg.431.1662096286025; Thu, 01 Sep 2022 22:24:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!69.80.99.15.MISMATCH!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 1 Sep 2022 22:24:45 -0700 (PDT)
In-Reply-To: <fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=62.194.189.128; posting-account=A91wAAoAAADgBUxBX6QqsrSD26GLhVp8
NNTP-Posting-Host: 62.194.189.128
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com> <fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <64706487-1bb0-4150-9f04-79b984fc06a5n@googlegroups.com>
Subject: Re: The color of lies
From: arjen.markus895@gmail.com (Arjen Markus)
Injection-Date: Fri, 02 Sep 2022 05:24:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 26
X-Received-Bytes: 2559
 by: Arjen Markus - Fri, 2 Sep 2022 05:24 UTC

On Thursday, September 1, 2022 at 10:39:32 AM UTC+2, Arjen Markus wrote:

> >
> I tried to view the result of this Fortran program with ghostscript and got rubbish. I also tried the result of the C program and that showed the picture I expected. So there is something different, possibly caused by the formatting. But I am no expert in PostScript.
>

Since I get a completely contorted picture with the Fortran program I am trying to figure out what is going on. The results are identical between Intel Fortran oneAPI and gfortran, but differ greatly when using the C version.

I have tried analysing the differences between the output from the Fortran program and the C program. So far I can find no cause, but:
- The output file from the C program is roughly 54000 bytes larger
- The number of lines is the same (I used a similar modification as John, but by filling a string of 60 characters)
- The lengths of the lines are equal
- The differences occur in the hexadecimal output but curiously enough not in the actual data (I write out the variables)

Very odd. I must be looking at it in a wrong way.

Regards,

Arjen

Re: The color of lies

<CFgQK.336$S2x7.98@fx43.iad>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2839&group=comp.lang.fortran#2839

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx43.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.13.0
Subject: Re: The color of lies
Content-Language: en-US
Newsgroups: comp.lang.fortran
References: <ten1c0$1o89m$1@dont-email.me>
<5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com>
<64706487-1bb0-4150-9f04-79b984fc06a5n@googlegroups.com>
From: lkrupp@invalid.pssw.com.invalid (Louis Krupp)
In-Reply-To: <64706487-1bb0-4150-9f04-79b984fc06a5n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 20
Message-ID: <CFgQK.336$S2x7.98@fx43.iad>
X-Complaints-To: abuse(at)newshosting.com
NNTP-Posting-Date: Fri, 02 Sep 2022 05:38:42 UTC
Organization: Newshosting.com - Highest quality at a great price! www.newshosting.com
Date: Thu, 1 Sep 2022 23:38:42 -0600
X-Received-Bytes: 2220
 by: Louis Krupp - Fri, 2 Sep 2022 05:38 UTC

On 9/1/2022 11:24 PM, Arjen Markus wrote:
> On Thursday, September 1, 2022 at 10:39:32 AM UTC+2, Arjen Markus wrote:
>
>> I tried to view the result of this Fortran program with ghostscript and got rubbish. I also tried the result of the C program and that showed the picture I expected. So there is something different, possibly caused by the formatting. But I am no expert in PostScript.
>>
> Since I get a completely contorted picture with the Fortran program I am trying to figure out what is going on. The results are identical between Intel Fortran oneAPI and gfortran, but differ greatly when using the C version.
>
> I have tried analysing the differences between the output from the Fortran program and the C program. So far I can find no cause, but:
> - The output file from the C program is roughly 54000 bytes larger
> - The number of lines is the same (I used a similar modification as John, but by filling a string of 60 characters)
> - The lengths of the lines are equal
> - The differences occur in the hexadecimal output but curiously enough not in the actual data (I write out the variables)
>
> Very odd. I must be looking at it in a wrong way.
>
>

Can you post both the Fortran program and the C program?

Louis

Re: The color of lies

<9194706b-24de-4d5f-8774-c91e96bbb49cn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2840&group=comp.lang.fortran#2840

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:ac8:5fd6:0:b0:343:4b4:1022 with SMTP id k22-20020ac85fd6000000b0034304b41022mr27252472qta.616.1662101225817;
Thu, 01 Sep 2022 23:47:05 -0700 (PDT)
X-Received: by 2002:a0d:cad7:0:b0:33f:57a8:9d03 with SMTP id
m206-20020a0dcad7000000b0033f57a89d03mr25463768ywd.105.1662101225595; Thu, 01
Sep 2022 23:47:05 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Thu, 1 Sep 2022 23:47:05 -0700 (PDT)
In-Reply-To: <CFgQK.336$S2x7.98@fx43.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=62.194.189.128; posting-account=A91wAAoAAADgBUxBX6QqsrSD26GLhVp8
NNTP-Posting-Host: 62.194.189.128
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com> <64706487-1bb0-4150-9f04-79b984fc06a5n@googlegroups.com>
<CFgQK.336$S2x7.98@fx43.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9194706b-24de-4d5f-8774-c91e96bbb49cn@googlegroups.com>
Subject: Re: The color of lies
From: arjen.markus895@gmail.com (Arjen Markus)
Injection-Date: Fri, 02 Sep 2022 06:47:05 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 6662
 by: Arjen Markus - Fri, 2 Sep 2022 06:47 UTC

On Friday, September 2, 2022 at 7:38:46 AM UTC+2, Louis Krupp wrote:
> On 9/1/2022 11:24 PM, Arjen Markus wrote:
> > On Thursday, September 1, 2022 at 10:39:32 AM UTC+2, Arjen Markus wrote:
> >
> >> I tried to view the result of this Fortran program with ghostscript and got rubbish. I also tried the result of the C program and that showed the picture I expected. So there is something different, possibly caused by the formatting. But I am no expert in PostScript.
> >>
> > Since I get a completely contorted picture with the Fortran program I am trying to figure out what is going on. The results are identical between Intel Fortran oneAPI and gfortran, but differ greatly when using the C version.
> >
> > I have tried analysing the differences between the output from the Fortran program and the C program. So far I can find no cause, but:
> > - The output file from the C program is roughly 54000 bytes larger
> > - The number of lines is the same (I used a similar modification as John, but by filling a string of 60 characters)
> > - The lengths of the lines are equal
> > - The differences occur in the hexadecimal output but curiously enough not in the actual data (I write out the variables)
> >
> > Very odd. I must be looking at it in a wrong way.
> >
> >
> Can you post both the Fortran program and the C program?
>
> Louis

Here is the C code with the extra output:

#include <stdio.h>
#include <math.h>

#define MULT(x,y,a,b,t) ((t)=(x)*(a)-(y)*(b),(y)=(x)*(b)+(y)*(a),(x)=(t))
#define DIV(x,y,a,b,t) (MULT(x,y,a,-b,t),x /= SQ(a,b),y /= SQ(a,b))
#define SQ(x,y) ((x)*(x)+(y)*(y))
#define pi 3.141592654
#define R 150

#define CONST 1.905e-3
#define ROWS 900
#define COLS 900
#define R2 .16

main() {
FILE *out;
double x,y,zr,zi,wr,wi,dr,di,angle,t;
int i,j,gray,ix,iy;
static char dots[]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};
static char *ps[]={"%%!\n",
"/str 256 string def\n",
"/go { image showpage } def\n",
"0 720 translate 72 72 scale\n",
"%d %d 8 [%d 0 0 -%d 0 %d]\n",
"{currentfile str readhexstring pop}\n",
"go\n"};

out = fopen("rootc.out", "w");

for(i=0;i<sizeof(ps)/sizeof(char*);i++) printf(ps[i],ROWS,COLS,R,R,R);

j=0;
for(ix=-ROWS/2;ix<ROWS-ROWS/2;ix++)
for(iy=-COLS/2;iy<COLS-COLS/2;iy++) {
zr=ix*CONST;
zi=iy*CONST;
gray=65535;
for(i=1;i<=224;i++) {
wr=zr,wi=zi;
MULT(wr,wi,zr,zi,t);
MULT(zr,zi,wr,wi,t);
zr *=2, zi *= 2;
zr += 1;
DIV(zr,zi,wr,wi,t);
zr /= 3; zi /= 3;
dr=zr-1,di=zi;
if(SQ(dr,di)<R2) break;
dr=zr+0.5,di=zi+0.866;
if(SQ(dr,di)<R2) break;
dr=zr+0.5,di=zi-0.866;
if(SQ(dr,di)<R2) break;
} if(i>224) angle=atan2(0.,-1.);
else angle=atan2(di,dr);
#if 0
fprintf(stderr,"%d %d %f %d\n",ix,iy,angle,i);
#endif
printf("%02x",(int)(fabs(angle)/.012272));
if(++j%30==0) putchar('\n');

fprintf(out, "%5d%5d %5d %16.8lf%16.8lf%16.8lf%16.8lf%16.8lf%16.8lf\n", ix, iy, (int)(fabs(angle)/.012272), ix*CONST, iy*CONST, zr, zi, dr, di);
} }

and here is the Fortran code:

PROGRAM ROOT3
REAL*8 PI/3.141592653589793d0/, CONST/1.905d-3/, R2R/.4d0/
INTEGER ROWS/900/, COLS/900/, R/150/
REAL*8 ANGLE
COMPLEX*16 Z, W, D
INTEGER I, J, GRAY, IX, IY
CHARACTER*50 PS(7)
character(len=60) :: output
integer :: pos
DATA PS/"%!",
* "/str 256 string def",
* "/go { image showpage } def",
* "0 720 translate 72 72 scale",
* "(I6, I6, ' 8 [', I6, ' 0 0 ', I6, ' 0 ', I6, ']')",
* "{currentfile str readhexstring pop}",
* "go"/
DO I=1,4
WRITE(*,'(A)') PS(I)
END DO
WRITE(*,PS(5)) ROWS, COLS, R, -R, R
DO I=6,7
WRITE(*,'(A)') PS(I)
END DO

pos = 1

DO IX=-ROWS/2, ROWS-ROWS/2-1
DO IY=-COLS/2, COLS-COLS/2-1
Z=CMPLX(IX*CONST, IY*CONST, KIND(1.D0))
DO I=1,224
W=Z*Z
Z=Z*W*2+1
Z=Z/W/3
D=Z-1
IF(ABS(D)<R2R) EXIT
D=Z+CMPLX(0.5D0, 0.866D0, KIND(1.D0))
IF(ABS(D)<R2R) EXIT
D=Z+CMPLX(0.5D0, -0.866D0, KIND(1.D0))
IF(ABS(D)<R2R) EXIT
END DO
IF(I>224) THEN
ANGLE=ATAN2(0.d0,1.d0)
ELSE
ANGLE=ATAN2(AIMAG(D), REAL(D))
ENDIF
! WRITE(*,'(Z2.2)') INT(ABS(ANGLE/0.012272))
WRITE(output(pos:pos+1),'(Z2.2)')
& INT(ABS(ANGLE/0.012272d0))
if ( pos < 60 ) then
pos = pos + 2
ELSE
pos = 1
write(*,'(a)') output
ENDIF
write(88,'(2i5,x,i5,x,10f16.8)') ix, iy,
& INT(ABS(ANGLE/0.012272d0)),
& ix*const, iy*const, z, d
END DO
END DO
END

The extra files are the same in size. by the way, minimal differences due to rounding, whereas the PS files are 1620166 bytes for the Fortran version and 1674155 for the C version.

Regards,

Arjen

Re: The color of lies

<fc437409-dfd3-48d3-a592-6b5b658f1353n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2841&group=comp.lang.fortran#2841

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:470b:b0:6bb:61ca:9ae9 with SMTP id bs11-20020a05620a470b00b006bb61ca9ae9mr21376072qkb.36.1662102308098;
Fri, 02 Sep 2022 00:05:08 -0700 (PDT)
X-Received: by 2002:a81:f47:0:b0:31f:434b:5ee with SMTP id 68-20020a810f47000000b0031f434b05eemr25979257ywp.383.1662102307807;
Fri, 02 Sep 2022 00:05:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 2 Sep 2022 00:05:07 -0700 (PDT)
In-Reply-To: <9194706b-24de-4d5f-8774-c91e96bbb49cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=62.194.189.128; posting-account=A91wAAoAAADgBUxBX6QqsrSD26GLhVp8
NNTP-Posting-Host: 62.194.189.128
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com> <64706487-1bb0-4150-9f04-79b984fc06a5n@googlegroups.com>
<CFgQK.336$S2x7.98@fx43.iad> <9194706b-24de-4d5f-8774-c91e96bbb49cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fc437409-dfd3-48d3-a592-6b5b658f1353n@googlegroups.com>
Subject: Re: The color of lies
From: arjen.markus895@gmail.com (Arjen Markus)
Injection-Date: Fri, 02 Sep 2022 07:05:08 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1511
 by: Arjen Markus - Fri, 2 Sep 2022 07:05 UTC

On Friday, September 2, 2022 at 8:47:07 AM UTC+2, Arjen Markus wrote:
....

Unfortunately, all leading spaces are removed again :(

Regards,

Arjen

Re: The color of lies

<tet03f$2hkqp$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2842&group=comp.lang.fortran#2842

  copy link   Newsgroups: comp.lang.fortran
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: cyrmag7@gmail.com (Cyrmag)
Newsgroups: comp.lang.fortran
Subject: Re: The color of lies
Date: Fri, 2 Sep 2022 08:22:54 -0500
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <tet03f$2hkqp$1@dont-email.me>
References: <ten1c0$1o89m$1@dont-email.me>
<5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com>
<4dedec21-2691-4eac-946a-0e08cad97e57n@googlegroups.com>
<teq577$25t0e$1@dont-email.me>
<c744105f-9449-42a9-84cf-ad24b476450cn@googlegroups.com>
<f45208de-7778-4f4d-85df-2fdd551a0c33n@googlegroups.com>
<e5313efb-cbf9-4b38-980b-fa8abce659e3n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 2 Sep 2022 13:22:55 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="23b853e31ddbc8ca812546b874457eff";
logging-data="2675545"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/2lHyD4ZmWuyV3KBT+b+nF"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.13.0
Cancel-Lock: sha1:4TE73dA6W9nsB+kznMzvVZQOe/s=
Content-Language: en-US
In-Reply-To: <e5313efb-cbf9-4b38-980b-fa8abce659e3n@googlegroups.com>
 by: Cyrmag - Fri, 2 Sep 2022 13:22 UTC

On 9/1/2022 4:10 PM, John wrote:
> Well, that worked for a long time, but google groups at least still shows no indenting. Oops. That thing goes out of it's way to mess up any kind of formatting, etc.

The indentation is fine when I view your post (with the Fortran code)
using Thunderbird. Copy-paste-compile works, as well.

Anyone using a news reader in combination with a Usenet service should
see the code fine, as well.

-- CyrMag

Re: The color of lies

<e8b7931f-8345-4e4f-954e-72581403c7ebn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2843&group=comp.lang.fortran#2843

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:620a:17a3:b0:6bb:3f5b:4cd5 with SMTP id ay35-20020a05620a17a300b006bb3f5b4cd5mr23769770qkb.337.1662127449128;
Fri, 02 Sep 2022 07:04:09 -0700 (PDT)
X-Received: by 2002:a25:bdd4:0:b0:696:4dbd:dcc9 with SMTP id
g20-20020a25bdd4000000b006964dbddcc9mr23601175ybk.392.1662127448832; Fri, 02
Sep 2022 07:04:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Fri, 2 Sep 2022 07:04:08 -0700 (PDT)
In-Reply-To: <tet03f$2hkqp$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:546:300:4c20:820:a6d5:bb46:7c7;
posting-account=7tVJUQoAAACymEG6aShD5R0lhHCm_A0r
NNTP-Posting-Host: 2601:546:300:4c20:820:a6d5:bb46:7c7
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com> <4dedec21-2691-4eac-946a-0e08cad97e57n@googlegroups.com>
<teq577$25t0e$1@dont-email.me> <c744105f-9449-42a9-84cf-ad24b476450cn@googlegroups.com>
<f45208de-7778-4f4d-85df-2fdd551a0c33n@googlegroups.com> <e5313efb-cbf9-4b38-980b-fa8abce659e3n@googlegroups.com>
<tet03f$2hkqp$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e8b7931f-8345-4e4f-954e-72581403c7ebn@googlegroups.com>
Subject: Re: The color of lies
From: urbanjost@comcast.net (John)
Injection-Date: Fri, 02 Sep 2022 14:04:09 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1922
 by: John - Fri, 2 Sep 2022 14:04 UTC

Test for pos < 59 instead of 60 because incrementing by two and I think the Fortran code would work. The example is divisible by 30 so the output line always gets filled, but if the size were changed to something not divisible by 30 the output would be full of the previous pass and not get written; but is OK as it is with the current size.

Re: The color of lies

<54e24a75-bd9c-4dca-bc67-fb990d882b02n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=2844&group=comp.lang.fortran#2844

  copy link   Newsgroups: comp.lang.fortran
X-Received: by 2002:a05:622a:164b:b0:344:513b:ffc0 with SMTP id y11-20020a05622a164b00b00344513bffc0mr41477148qtj.350.1662405688970;
Mon, 05 Sep 2022 12:21:28 -0700 (PDT)
X-Received: by 2002:a25:bdd4:0:b0:696:4dbd:dcc9 with SMTP id
g20-20020a25bdd4000000b006964dbddcc9mr35015820ybk.392.1662405688736; Mon, 05
Sep 2022 12:21:28 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.fortran
Date: Mon, 5 Sep 2022 12:21:28 -0700 (PDT)
In-Reply-To: <e8b7931f-8345-4e4f-954e-72581403c7ebn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=62.194.189.128; posting-account=A91wAAoAAADgBUxBX6QqsrSD26GLhVp8
NNTP-Posting-Host: 62.194.189.128
References: <ten1c0$1o89m$1@dont-email.me> <5cfbb72c-f9ee-43da-844b-093e59787505n@googlegroups.com>
<fcc25476-bea9-4396-a452-d89ff9df6b87n@googlegroups.com> <4dedec21-2691-4eac-946a-0e08cad97e57n@googlegroups.com>
<teq577$25t0e$1@dont-email.me> <c744105f-9449-42a9-84cf-ad24b476450cn@googlegroups.com>
<f45208de-7778-4f4d-85df-2fdd551a0c33n@googlegroups.com> <e5313efb-cbf9-4b38-980b-fa8abce659e3n@googlegroups.com>
<tet03f$2hkqp$1@dont-email.me> <e8b7931f-8345-4e4f-954e-72581403c7ebn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <54e24a75-bd9c-4dca-bc67-fb990d882b02n@googlegroups.com>
Subject: Re: The color of lies
From: arjen.markus895@gmail.com (Arjen Markus)
Injection-Date: Mon, 05 Sep 2022 19:21:28 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2271
 by: Arjen Markus - Mon, 5 Sep 2022 19:21 UTC

On Friday, September 2, 2022 at 4:04:11 PM UTC+2, John wrote:
> Test for pos < 59 instead of 60 because incrementing by two and I think the Fortran code would work. The example is divisible by 30 so the output line always gets filled, but if the size were changed to something not divisible by 30 the output would be full of the previous pass and not get written; but is OK as it is with the current size.

Indeed, with the revised test I get the expected intricate picture! Thanks. There is a single pixel that has a different value in the Fortran version than in the C version, but I doubt anyone would see that.

Regards,

Arjen

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor