Live data from Hacker News

Childhood Computing

susam.net

31–40 of 133 posts

Re: Childhood Computing

#31
post #28

One thing that was nice about the graphics programming those days was that when you drew something on the screen, it remained there until your program erased it. This means that you could create cool looking graphics easily. For example, you can just compute the points of a circle and draw the points one by one, and in the screen it will show a full circle being drawn. "Modern" graphics libs (even SDL I think), made…

It's been a while (over a decade now), but I think SDL allows you to leave the contents on the screen if you don't call the clear function before you render new content. I don't know how well that'd work with resizing a window though.

I think it works like that if acceleration is no enabled. But even then I think it does not work reliably..I might be missing something though.

Re: Childhood Computing

#32
post #28

One thing that was nice about the graphics programming those days was that when you drew something on the screen, it remained there until your program erased it. This means that you could create cool looking graphics easily. For example, you can just compute the points of a circle and draw the points one by one, and in the screen it will show a full circle being drawn. "Modern" graphics libs (even SDL I think), made…

SDL is a relatively high level API and framebuffer style graphics work fine on it. I think there are some edge cases for X11 with non-compositing window manager where you will get interesting glitches if the window moves.

Re: Childhood Computing

#33

I actually had to revisit this sort of thing in a recent design for a CNC --- for want of a good way to determine the location of a smaller circle nested into the region between two larger circles, I made a Circular Array of circles of the desired size, adjusting the number of them until one lined up as desired: https://community.carbide3d.com/uploads/default/original/3X/... (If someone knows a good/ideal technique f…

Let's give it a try.

I'm going to make two assumptions based on your screenshot:

1. The large circles A and B are touching each other

2. You know the radius (a,b,c) of each circle and want the third one (circle C) to touch both of the first two.

What I'd do is place the center of both circles A and B on the same horizontal line and choose a frame of reference such that the center of circle A is the origin, and the center of circle B is placed at coordinates (a+b, 0)

Now we are looking for the coordinates (x, y) of the center of circle C, placed above the x-axis. Which by the way is one of two solutions, as there is a symmetrical circle C' placed below the x-axis, with the coordinates (x, -y)

We know that if we traced a straight line from the center of C, it would intersect the x-axis at a 90° angle. So drawing that line creates two triangles which each have a right angle in this spot:

- one triangle on the left, where the hypothenuse goes from the center of A (0,0) to the center of C (x,y). Its length is the sum of the radii of A and C.

- one triangle on the right, where the hypothenuse goes from the center of B (a+b,0) to the center of C (x,y). Its length is the sum of the radii of B and C.

Both of these triangles share a vertical segment of length (y).

The left triangle's bottom segment has a length of (x) and the right triangle's bottom segment has a length of: (a+b) - x

We know from Pythagore that the square of the length of the hypothenuse is equal to the sum of the squares of the two sides of each triangle, so we know that:

    (a+c)^2 = x^2 + y^2

    (b+c)^2 = ((a+b) - x)^2 + y^2
So

    y^2 = (a+c)^2 - x^2 = (b+c)^2 - ((a+b) - x)^2

    (a+c)^2 - x^2 = (b+c)^2 - ((a+b) - x)^2
Develop it all

    a^2 + c^2 + 2ac - x^2 = b^2 + c^2 + 2bc - ((a+b)^2 + x^2 - 2ax - 2bx)
Simplify

    a^2 + 2ac = b^2 + 2bc - (a^2 + b^2 + 2ab - 2ax - 2bx)


    a^2 + 2ac = 2bc - a^2 - 2ab + 2ax + 2bx

    2 a^2 + 2ac - 2bc + 2ab = 2ax + 2bx

        a^2 + ac + ab - bc
    x = ------------------
               a+b
and from there you find y, from y^2 = (a+c)^2 - x^2.

I did notice that in your screenshot A and B are of the same size, so if you knew this from the start it becomes way simpler.

x = a (of course the center of your new circle is at the vertical of the point where both circles touch, which is obvious due to the symmetry of the problem)

and

y = squareroot(c^2 + 2ac)

Re: Childhood Computing

#34
post #20

As computers grew more powerful, they became less interesting. There is a lesson in there somewhere that humanity has not yet woken up to.

I don't know if it's that quite it I think they became less interesting because they became more homogenous, more standardized, more commercialized It's like the internet. It was more interesting when everything was spread out and you felt like you had to explore it. Now it's all the same content collected on the same 5 sites, and it feels like there's nothing actually interesting out there anymore

Not sure. Computers where pretty homogenous back then as well. Every time I find myself infront of a computer, I would do "cd games", and there would be games...

I think it started becoming less interesting as it grew more powerful and with it came more capable displays and GUI interface, and before you know it, computers are indistinguishable from a damn television.

At least for me as computers started showing more realistic graphics, it became less abstract, less magical, less interesting. After all, reality is pretty boring...Not sure how we collectively missed that fact...

Re: Childhood Computing

#35
post #34

Earlier quoted context omitted.

I don't know if it's that quite it I think they became less interesting because they became more homogenous, more standardized, more commercialized It's like the internet. It was more interesting when everything was spread out and you felt like you had to explore it. Now it's all the same content collected on the same 5 sites, and it feels like there's nothing actually interesting out there anymore

Not sure. Computers where pretty homogenous back then as well. Every time I find myself infront of a computer, I would do "cd games", and there would be games... I think it started becoming less interesting as it grew more powerful and with it came more capable displays and GUI interface, and before you know it, computers are indistinguishable from a damn television. At least for me as computers started showing more…

That's fair.

There's probably also an aspect of "The computer used to be a place you would go, now it's a rectangle that comes everywhere with you"

It's definitely less magical when it is everywhere and in everythin

You're not alone in missing the magic though. I miss it too

Re: Childhood Computing

#36
post #28

One thing that was nice about the graphics programming those days was that when you drew something on the screen, it remained there until your program erased it. This means that you could create cool looking graphics easily. For example, you can just compute the points of a circle and draw the points one by one, and in the screen it will show a full circle being drawn. "Modern" graphics libs (even SDL I think), made…

Both so-called "retained" and "immediate" mode graphics libraries continue to exist for most platforms, and you can choose to use whichever one you prefer.

Re: Childhood Computing

#37
post #8

I never understood why Microsoft didn't have affordable licences to encourage kids to program. The school computer lab had Visual Basic but you only got an hour week in there as part of the computing subject, the school library computers couldn't have it because the licence was per seat not per site. You really only had QBASIC which was great but we really wanted to write Windows apps. You'd be up for a thousand doll…

I started my computing life on BBC Model B machines, which simply came with BASIC builtin, no license required. It was immediately apparent to me that there was something odd happening with operating systems that required you to pay extra to be able to write software.

40 years later, and I've successfully managed to never use a Microsoft product.

Re: Childhood Computing

#38

At school we had a bunch of older machines with windows 3.1, which had some touch typing program installed - it was the only thing we were allowed to use Our first family computer was bought back in 1995. IIRC it was a 166 MHz Pentium / 16 MB ram machine with Windows 95. It cost around $3500-4000 back then, and that's not adjusted for inflation. EDIT: As a side note, 3 years later I managed to get my hands on a copy…

I essentially owe my career to two great strokes of luck. The first was that my father purchased a PC in the early 1990s to help out with his self-employed publishing business, and like most PCs of the time, it came preloaded with QBasic and the source code for a couple of games like GORILLA.BAS that an introverted kid with a lot of free time could mess around with. The second was attending a high school with a reaso…

But making tools tinkerable is incompatible with extracting maximal value from them!

Re: Childhood Computing

#39
> These are expensive machines

Impressive how that part changed. Today, many computers are cheaper than the desk they are sitting on. Many companies pay over $2000 for office furniture, and that's not even fancy. A $1000 laptop sits on top of it.

Furniture made by an actual cabinet maker will easily get to $5000+. About the price of a maxed out gaming rig, or an enterprise level workstation.

Re: Childhood Computing

#40

I actually had to revisit this sort of thing in a recent design for a CNC --- for want of a good way to determine the location of a smaller circle nested into the region between two larger circles, I made a Circular Array of circles of the desired size, adjusting the number of them until one lined up as desired: https://community.carbide3d.com/uploads/default/original/3X/... (If someone knows a good/ideal technique f…

Let's give it a try. I'm going to make two assumptions based on your screenshot: 1. The large circles A and B are touching each other 2. You know the radius (a,b,c) of each circle and want the third one (circle C) to touch both of the first two. What I'd do is place the center of both circles A and B on the same horizontal line and choose a frame of reference such that the center of circle A is the origin, and the ce…

Thank you for that!

I am going to make a link to your comment from the forum post in question:

https://community.carbide3d.com/t/knapp-joint-with-cnc/19723 (scroll all the way to the bottom)

and will hopefully be able to translate that into Open(Python)SCAD code so as to make a generalized solution for my current project:

https://github.com/WillAdams/gcodepreview

Post reply on HN