Pentacles

General FreeBASIC programming questions.
Post Reply
Richard
Posts: 3096
Joined: Jan 15, 2007 20:44
Location: Australia

Re: Pentacles

Post by Richard »

@albert. If you build a recirculating delay line from a coil of wire you can store numbers in it. Those storage systems were around for 30 years, but became extinct by 1970.
https://en.wikipedia.org/wiki/Delay_lin ... elay_lines

By putting the LSB of the number first you could perform serial arithmetic as the numbers circulated. A scientific calculator could be built, using the shift register based CORDIC algorithms for the arithmetic and transcendental functions.
Come to think of it, I could use an optic fiber for a scientific calculator.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Pentacles

Post by albert »

@Richard

I thought of that ( optical computer ) as well , several years ago..

For the memory you have a rotating drum of glow-in-the-dark material.

As the drum turns , if a bit is lit , then the laser relights it , else it lets it die down..
So you have rows of glow-in-the-dark bits and rows of rewrite lasers.
Then to read the memory , you have a row of optic detectors , that tell if bit is lit or not.
( if it's lit , then the write laser hits it again to keep it glowing , else it skips it and lets it go dark to a "0" )

Glow-In-The-Dark-Computer!!

A two foot drum could hold Tera-Bytes of memory.. ( It too would be nuclear resistant.. )
Richard
Posts: 3096
Joined: Jan 15, 2007 20:44
Location: Australia

Re: Pentacles

Post by Richard »

@Albert.
If you used the phosphorescent screen of a CRT you could both write and read the bits with the electron beam. You could also see the bit pattern on the screen with your eyes. Patented in 1947.
https://en.wikipedia.org/wiki/Williams_tube

PS. The radiation from a nuclear explosion would light up a glow-in-the-dark screen for quite some time.
It would also erase the operator.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Pentacles

Post by albert »

@Richard

The screen is not glow in the dark , the memory and registers are glow in the dark..

But the glow in the dark material has to go dark after 1 drum turn..

So it has to fade to a "0" after a short time , if it's not updated by the write laser...

You might be able to use phosphers for the memory and registers , if they could hold a light for a long enough time..
Richard
Posts: 3096
Joined: Jan 15, 2007 20:44
Location: Australia

Re: Pentacles

Post by Richard »

Albert wrote:You might be able to use phosphers for the memory and registers , if they could hold a light for a long enough time
Controllable glow-in-the-dark materials are called phosphors. The problem with phosphors for memory is that they fade with a fixed half-life, so they cannot be suddenly turned off.

Instead of a rotating drum, the Williams tube scanned the bits mapped on the CRT phosphor with the electron beam. It used a fast phosphor that would fade quickly, but continuously refreshed the phosphor dots like a dynamic memory.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Pentacles

Post by albert »

@Richard

I thought up a good idea...

You use red , green , blue lasers and fiber optics..

It wouldn't be binary , it would count off , red , green , blue. 0 , 1 , 2 , 3 ( i guess it would be Quadri-nary.. )

Then you could do math by manipulating and mixing the colors..

red x red = red
green x green = blue and red etc...
Richard
Posts: 3096
Joined: Jan 15, 2007 20:44
Location: Australia

Re: Pentacles

Post by Richard »

Albert wrote:I thought up a good idea...
You use red , green , blue lasers and fiber optics..
You need to stop thinking outside the box, until you have studied what is in the box.

With three colours you have 8 possible states which is octal. You are now in the field of photonics.
But it is also quite impractical, which makes it a bad idea.

Your good ideas are easily identified, because they typically fell out of use about 50 years ago.
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Pentacles

Post by albert »

@Richard

With the colors..

You have 3 color LED's = off , red , green , blue.. 4 values per register bit.. ( 0 to 3 )

red x red ( 1 x 1 ) = 1 = red
green x green ( 2 x 2 ) = 4 = ( 1 , 0 ) = red shl 1

A photo-computer...

Memory and registers are Tri-Color LED's , the buss is fiber optics..
LED's have a rise and fall time , that would affect the speed of the system.
angros47
Posts: 2323
Joined: Jun 21, 2005 19:04

Re: Pentacles

Post by angros47 »

albert wrote: A two foot drum could hold Tera-Bytes of memory.. ( It too would be nuclear resistant.. )
So, a two foot device would hold the same amount of memory of a 2.5 inches hard drive? Not a real gain.

Also, your idea is almost the same of a Williams tube https://en.wikipedia.org/wiki/Williams_tube that was invented in 1946, so 75 years ago
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Pentacles

Post by albert »

@angros47

With the glow in the dark memory drum..

The glowing bits , would be laser widths apart.. So a 2 foot drum , would hold like a terabit in a single laser row.

Great for long term space missions.. The glow in the dark material never goes bad..
I think lasers also , last forever..

The only thing is ; the motor that turns the drum , might go bad..

Then you would need another motor to slide back and forth to a specific rows to read the glowing bits.. Like a hard drive..
albert
Posts: 6000
Joined: Sep 28, 2006 2:41
Location: California, USA

Re: Pentacles

Post by albert »

@Richard

How about this idea....

You have a grid of photo detectors etched onto a large chip..
Then you have heat shrink plastic sandwiched between two clear Plastic plates.

The you have a write laser that goes back and forth and to and fro , burning holes in the heat shrink plastic..

Then you have a back light that shines on the plate..
If there's a laser hole in the heat shrink , the light would shine through the hole and triggers the photo detector at that grid position to a "1"

A write-once ROM memory plate.. Unlike CD's that get smudges and scratches , It would be "forever" memory..
angros47
Posts: 2323
Joined: Jun 21, 2005 19:04

Re: Pentacles

Post by angros47 »

albert wrote:I think lasers also , last forever..
And I think you are wrong, since optical drives often fail and need to be replaced
Richard
Posts: 3096
Joined: Jan 15, 2007 20:44
Location: Australia

Re: Pentacles

Post by Richard »

Albert wrote:@Richard
How about this idea....
Everything you are writing about is fantasy.

The more you post, the more you confirm that you have no idea of what you are talking about. It is not impressive and makes you look like an fool. This is really not the place to stream fantasy.

Maybe the moderators will shortly provide you with the incentive to find a more appropriate science fiction site, or give you another month to review your medication.
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Pentacles

Post by badidea »

Something useless to start the week with:

Code: Select all

#define i32 long
#define u32 ulong
#define f64 double

#define _alpha_(c) ((c shr 24) and &hff)
#define _red_(c) ((c shr 16) and &hff)
#define _grn_(c) ((c shr 8) and &hff)
#define _blu_(c) (c and &hff)

#define _min_(v1, v2) (iif(v1 < v2, v1, v2))
#define _max_(v1, v2) (iif(v1 > v2, v1, v2))
#define _limit_(v, min, max) (_min_(_max_(v, min), max))

#define rnd_color() (&hff000000 or int(rnd(1) * &hffffff))
#define rnd_range(min, max) (rnd(1) * (max - min) + min)

const SW = 800, SH = 600
screenres SW, SH, 32
width SW \ 8, SH \ 16

function color_interpolate(c1 as u32, c2 as u32, f as double) as u32
	dim as i32 r, g, b
	f = _limit_(f, 0.0, 1.0)
	r = cint(cast(i32, _red_(c2) - _red_(c1)) * f) + _red_(c1)
	g = cint(cast(i32, _grn_(c2) - _grn_(c1)) * f) + _grn_(c1)
	b = cint(cast(i32, _blu_(c2) - _blu_(c1)) * f) + _blu_(c1)
	r = _limit_(r, 0, 255)
	g = _limit_(g, 0, 255)
	b = _limit_(b, 0, 255)
	return rgb(r, g, b)
end function

randomize timer
for i as i32 = 1500 to 100 step -1
	dim as i32 xc = rnd_range(0, SW - 1)
	dim as i32 yc = rnd_range(0, SH - 1)
	dim as i32 rc = sqr(i) 'rnd_range(10, 100)
	dim as u32 c1 = color_interpolate(&hffffffff, rnd_color(), 0.8)
	dim as u32 c2 = color_interpolate(&hff000000, c1, 0.2)
	'scan per line, loop x within y
	for y as i32 = _max_(0, yc - rc) to _min_(yc + rc, SH - 1)
		for x as i32 = _max_(0, xc - rc) to _min_(xc + rc, SW - 1)
			dim as i32 dx = x - xc
			dim as i32 dy = y - yc
			dim as f64 dist = sqr(dx * dx + dy * dy)
			if cint(dist) < rc then
				pset(x,y), color_interpolate(c1, c2, dist / rc)
			end if
		next
	next
next
getkey()
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Pentacles

Post by dodicat »

Thanks badidea, that would have been a great one for the circles topic.
You have given me an idea to cook those hexagons au naturel.

Code: Select all

type pt
    as long x,y
end type

#define map(a,b,x,c,d) ((d)-(c))*((x)-(a))/((b)-(a))+(c)
#define dist(p1,p2) sqr((p1.x-p2.x)*(p1.x-p2.x) + (p1.y-p2.y)*(p1.y-p2.y))
function closest(clr() as pt,v as pt) as ulong
    dim as ulong res
    dim as single dt=1e20
    for n as long=lbound(clr) to ubound(clr)
        var distance=dist(clr(n),v)
        if dt> distance then dt = distance:res=n 'catch the smallest
    next n
    return res
end function

screen 20,32
dim as pt p(any): dim as long ctr,k=1
for x as long=-100 to 1024+100 step 100
    for y as long=-100 to 768+100 step 100*.86603
        k=-k
        ctr+=1
        redim preserve p(1 to ctr)
       if k=1 then p(ctr)=type(x,y) else p(ctr)=type(x+50,y)
        circle(p(ctr).x,p(ctr).y),1
    next
next
for x as long=-100 to 1024+100 
    for y as long=-100 to 768+100 
       var c=closest(p(),type(x,y))
       var d=dist(type<pt>(x,y),p(c))
       var m=map(0,70,d,0,255)
       pset(x,y),rgb(m,m,m)
    next
next
print "done"
sleep



 
Post Reply