Jump to content

h4tt3n

Senior Members
  • Posts

    162
  • Joined

  • Last visited

Posts posted by h4tt3n

  1. that's the seebeck effect. put power back into it and one side gets cold, one side gets hot. that's the peltier effect. you draw energy from the temp differental. the edison effect actually converts heat energy directly into electricity (it takes about 5000 degrees celcius to get anything measurable though).

     

    Cool, I was wondering what that effect might be called.

  2. Actually its fairly easy to draw a current from a heat source like a candle. Of course the above movie is a hoax, but the real method takes even less materials.

    All you need is three metal wires of two different materials (of different electronegativity). Copper and iron works fine. Twine the ends of each piece around the next to make the three wires into one large one like this: copper (twine) iron (twine) copper or iron (twine) copper (twine) iron.

    Now heat one of the twinings and you can draw current from the wire. The larger the difference in temperature between the two twinings, the larger current you get. But I doubt that a single "cell" of this type can produce even near enough electricity from a candle to make a bulb glow like the one in the movie.

     

    Edit: Hmm... I've got a gas solder, a digital meter, and some wires lying around. Maby I'll set up an experment tonight (european time) just for the fun of it. How about you people?

  3. Hello,

     

    A few times I've been stumbling across this equation on the net, but a quick search through my mechanics books didn't help much.

     

    It states that for an object:

     

    ds = v * dt + (a * dt^2) / 2

     

    where ds is distance moved, dt is time, v is velocity, and a is acceleration.

    I haven't been able to make any sense from it, and I haven't been able to make it work in an programs that I tested it in.

     

    edit: I take it we all agree that ds = v * dt, and that's pretty much it? (given a constant velocity)

     

    michael

  4. I'd like some advice regarding buying or building an air dehumidifier. I know they exist, but I have no experience with them whatsoever.

     

    I've got a small ( ~ 20 m2) cabin-like house with serious moisture problems. Food, papers and clothing will be ruined if left there. The surface is near ground-water level, and because of the surrounding trees it's in the shadow for most of the day. The average room temperature is pretty low.

    The trouble is that I haven't got electricity installed to run a dehumidifier. I'm willing to invest in a 20-30 watt solar panel or fan, but I know it can be done without electricity too. I'd prefer a solution that can run 24/7 also when I'm not there, but it's not mandatory.

     

    So, any ideas? Cooling or dessicant, or something else? Can it be done?

     

    best regards,

    Michael

  5. Sounds interesting, please drop a hint when you've got something. Anyway, this IS what graphics libraries like openGL and Direct3D were made for. But of course it takes time to learn - just started out myself - but on the other hand there are loads of ressources, tutorials, forums and the like out there!

  6. we havent really answered the questions on this thread, "can you do one equation to map the gravity gradient?" the answer is yes BUT it's a 4 dimesional equation and must be recalculated for each position and rewritten for each interval. it is the sum of the forces applied by each other particle felt differently in all locations.

     

    Yeah, as already mentioned in this thread we'll probably never see the n-body problem for n > 3 compressed into a single equation. And even IF we could get an exact quantitative description of mutiple-body systems, it'd still only give those exact results if it were to simulate a system of perfectly spherical and homogenous bodies that didn't change mass or density over time or even rotated around their axes - simulating a real system over long stretches of time would still not work, since a lot of different phenomenons like continuous destruction and formation of bodies, tidal effects and solar wind wouldn't be taken into consideration within such an equation. If we'd just wanted a qualitative simulation then that'd be ok - but in an exact quantitative simulation that'd change success into miserable failure.

     

    i'm thinking about doing this 3d, any tips on simple foreshortenning or stereoscopics?

     

    Hmm... I'm not entirely sure what you mean (englis isn't my mother tongue). If you're searching for a way to represent the result graphically, then three windows showing XZ - XY - ZY works pretty well. Some time back I saw a very nice and short openGL code snippet that allowed you to ghost around in a 3D representation of a system of moving bodies. It looked really nice, but I don't know if VB6 supports openGL? Actually I might want to look into that myself too - I'll post a link once I dig it up.

     

    Edit: There you go. Scroll right down to the bottom. http://www.freebasic.net/forum/viewtopic.php?t=1664

  7. There's a sci-fi novel from the 60'es or 70'es with a similar plot, but I just can't remember title or author. I think you should definitely still try to write your version of it - the one mentioned wasn't too good. Well, come to think of it... it did focus alot on tech and practical things and less on its main characters. I'll try chasing up a title for you.

  8. Your'e welcome, alan2here. It's been fun, and I*m glad you showed me your version of the program, too. I'll definitely keep working on that idea!

     

    you can optimise the program down to the point where you do (n^2 + n)/2 iterations per interval. where n=the number of significant feilds

     

    it's basically the "handshake problem" how many handshakes if everyone in a room were to shake hands. it'll end up as triangular numbers.

     

    Yup, didn't get around to mentioning that. This is what I do when coding:

     

    For n = 1 To np
       For nn = n+1 To np
           ...
           ...
       Next
       ...
    Next

     

    instead of just:

     

    For n = 1 To np
       For nn = 1 To np
           ...
           ...
       Next
       ...
    Next

     

    Oh, and its (n^2 - n)/2 ;-)

    It can also be written as (n*(n-1))/2

     

    you can cut a few more lines out by writing

    distance (d) = root(x^2+y^2+z^2)

    force(x) = x/(distance^3)

     

    because you're essentailly writing

     

    x component of the unit vector = x/d

    force = 1/(d^2)

    x component of force = force * x component of unit vector

     

    so it follows that

    1/(d^2) * x/d = x/(d^3)

     

    Yes, I did this too when trying to optimize - but it slowed the program down! Go figure ?!? I suppose the ^3 part somehow means more calculations, but I honestly dont know.

     

    what do you do to prevent the objects superimposing? i often get readings like d=0 so i get undefined values for force. should i add 1 to the distance before i determine the force?

     

    I use a code snippet that prevents the "distance" variable to never be smaller than the sum of the two objects' radiuses. But its really a pain... You prevent d ~ 0 related problems by doing so, but the objects stop moving in realistic orbits when they overlap. Alan2heres program actually gets aroun this very nicely, since al gravitational attraction is precalculated and can never exceed the initially given max value. Nice and simple, although a tad inaccurate.

     

    best regards,

    Michael

  9. Got it!

     

    Btw there is an error in your code. When finding the correct distance using pythagoras your code shouldn't look like this:

     

            dist_x = x(n) - x(nn)
           If dist_x < 0 Then dist_x = -dist_x
           dist_y = y(n) - y(nn)
           If dist_y < 0 Then dist_y = -dist_y
           dist = dist_x + dist_y
           dist = Int(dist)

     

    Instead it should look like this:

     

            dist_x = x(n) - x(nn)
           dist_y = y(n) - y(nn)
           dist = Sqr(dist_x^2 + dist_y^2)
           dist = Int(dist)
    

     

    Since the hypothenuse of the triangle - your distance - is sqare root ( dist x sqared + dist y sqared), not just dist x + dist y.

    I also cut out this:

     

    If dist_x < 0 Then dist_x = -dist_x
    If dist_y < 0 Then dist_y = -dist_y

     

    since -X sqared = X sqared and of course -Y sqared = Y sqared

     

    Oh, and please notice how much faster the freeBasic version of the program is running. Mind you, it is an exact copy of your program - I haven't changed a thing! (except fixing the distance error mentioned before, and that actually slows it down a bit.)

     

    This is why you should definitely drop visual basic and go FreeBasic! The syntax is almost the same, but the compiler is much, much better. The newest version also supports object oriented programming and whatnot.

     

    Edit: the attached file contains all programs + source code discussed so far + a new version I made of your program. You can more or less just copy - paste my code into VB since the languages are much alike.

     

     

    Michael

    Gravity programs.zip

  10. My code works verry well. Maybe it just does it in a diffrent way to yours, I am trying to replicate you'rs now, please try and replicate mine and you will see

     

    Indeed it works fine. I'll make my own version, too - that'd be fun! Gravity is an "inverse sqare" force, and since I didn't seem to find any inverse sqare stuff in your code I though it didn't work - but now I see it!

    I must say that my program is probably a lot more accurate than yours, since your code only have 40 different values of gravitational attraction depending on distance. Since gravity depends on both mass and distance, this limits your program to only simulate bodies that all have the same mass.

     

    Is LBound the name of an array or a command?

     

    If I dim an array named "A" from 0 to 100, then Lbound(A) refers to the lowest number in the array = 0. Opposite is Ubound(A) = 100.

     

    What the heck is .Xvec, is it x cordatate vector? If it means vector then are vectors a data structure e.g 'an array' or a matmatical teqneek e.g 'modulo'?

     

    I'm using the so called types, which is a sort of variable with any number of "sub-variables" you like - like this:

     

    Type Planet
     X As Single
     Y As Single
     XVec As Single
     YVec As Single
     Mass As Single
     Radius As Single
     Col as Integer
    End Type 

     

    All values are dimmed as singles = single precision floaing point. X and Y are the cordinates of the planet. Xvec and Yvec are the horisontal and vertical velocity vector. Mass, radius and color are self-explanatory.

     

    So, when it says

    Body(i).X += Body(i).XVec

    this simply means add the horisontal velocity vector to the x coordinate of planet number i - this then defines the new x value, in which the planet will be drawn in the next loop.

     

    Why do you have -= and +=? is this a languege spacific like how 'c' used ++ to increment a variable.

     

    X += 5 is just a short form of writing X = X + 5. A lot of programming languages allows you to use this short form.

     

    You'rs also seems to turn into a spinning disk quite quickly and contains planets of diffrent weights and sizes, wheras mine will become more messy and cayotic if large numbers of planets are started at random positions and velocitys and in mine all planets weigh and are the same size and drawn as single points.

     

    The planets in my program doesn't shape a spinning disc by it self - I make them do that. I place a large object (the sun) in the center, then I place all objects in a circle around it, and then I "push" them exactly enough to obtain a circular orbit around the sun. I wouldn't mind explaining it in greater detail, if you want that.

     

    Search wikipedia for all the explanations and formulas. It's a great resource if you want to know more about this stuff.

     

    Michael

  11. A consistent setting is important, but I think it's a mistake to confine oneself to what is scientifically plausible by today's knowledge; after all, 200 years ago, it would be ridiculous to speculate about wireless global communication networks and directly altering organisms' genetic material. Clarke himself said 'Any sufficiently advanced technology is indistinguishable from magic.'

     

    Agree. This was never an issue for me, as already mentioned above. The main point is that you decide for a set of rules. Your tech can be as incredible as you like, as long as it stays within its limitations and follows consistent rules - or sets of physical laws if you prefer that term.

     

    True, but does 'based on' really mean that much? IMHO, sci-fi isn't that different from fantasy: both invent new, strange worlds (or variants of the current world), only with different explanations. A character teleports, and in one it's because of magic, while in the other it's due to a machine, and neither pay attention to the fact that it's impossible in the real world.

     

    Disagree. Funny enough I'm currently writing a short story in which the way a teleport (machine) works has a crucial impact on the plot. And since this IS a pilot thread, here goes:

    To rule our any misunderstanding: of course it's all really about people! But none the less... If a teleport was ever made it would probably be non-destructive: the original 'copy' of a person would not dissapear in the teleportation-process. Of course he wouldn't! In the real (non-star-trek) world he'd probably be scanned and 'mapped', and then a copy of him would be assembled somewhere else - then the original person would be destroyed afterwards, killed while anesthetized. Of course this part can't be known by the general public. This method of teleportation is simply too unethical to be possible if people knew they'd get killed each time they traveled. So much for the tech part - now to the intersting stuff...

    What if such a newly 'teleported' person by mistake woke up just before he was to be killed? Strapped to a chair in the teleport device, kicking and screaming, begging for his life? You couldn't just let him go - he's already arrived at his destination. And you couldn't just kill him while awake - for both ethical and practical reasons. The person would never cooperate.

     

    In my story a minister is caught in this situation. He's the first person ever to be teleported (in a very near future world). The story revolves around his 'mental journey' from beeing ablaze with anger and fear over his situation, kicking and spitting, and to getting to accept it - agreeing to face death - Accepting the fact that he doesn't really die - it's just the old copy that dissapears, since he is in fact well and alive, already arrived at his destination.

     

    The story really asks some big questions. It sets death in a new perspective.

    It challenges our way of thinking of death. It challenges our instinct of survival and plays it out against our ability to think and reason.

     

    Anyway, you could never write this story without taking technology into consideration. The plot depends on technology - although it, as you can see, really is about real human beeings.

     

    Michael

  12. comments were on your story line. star/trek was, even is, a huge success and amplified the character issue. but was done 50 years ago to a very different population. i wish you luck as writing fiction is a very difficult and competitive field. fewer are successful than most any field. if that is your passion my only advice would be to follow that...the rest will come together.

     

     

    Ok, you both mentioned star-trek and I reacted on that. No reason to stretch it further. And thanks for the encouragement - Currently I'm finishing a novel that's been fairly well received so far. It will be ready for publishing in a few months, and I already have an agreement with a publisher - sort of :rolleyes:

    Beers are on me if it works out!

  13. Is it simerlar to my program? If not I would love to know how it works.

     

    Hi alan2here,

     

    I'm afraid there's quite a bit of difference between you code snippet and my programs. Actually it does'nt look like your program is going to work at all - did you test it?

     

    Anyway, I'm simply too tired righ now to explain how my programs works, but here's the important part of the code for you to look at. I'll get back to the explanation soon, but It'd be good practice for you to try and figure it out yourself :)

     

      For i = Lbound(Body) to Ubound(Body)
    
       For i2 = i+1 To Ubound(Body)
    
         Dist_X = Body(i).X-Body(i2).X
         Dist_Y = Body(i).Y-Body(i2).Y
         Dist_sqared = Dist_X^2 + Dist_Y^2
         Dist = sqr(Dist_Sqared)
    
         Force = Body(i2).Mass/Dist_sqared
         Body(i).Xvec -= (Dist_X/Dist)*Force
         Body(i).Yvec -= (Dist_Y/Dist)*Force
    
         Force = Body(i).Mass/Dist_sqared
         Body(i2).Xvec += (Dist_X/Dist)*Force
         Body(i2).Yvec += (Dist_Y/Dist)*Force
    
       Next
    
       Body(i).X += Body(i).XVec
       Body(i).Y += Body(i).YVec
       Circle(Body(i).X, Body(i).Y), Body(i).Radius, Body(i).Col,,,1,F
    
     Next

     

     

    Edit:

     

    If you want to tamper with the whole piece of code, I'll post it for you. I'd recommend downloading the FreeBasic and FBide bundle here. It's a great and really fast basic compiler and it's very easy to use. Anyway I had lots of fun with it, and I never really bothered learning C++ since freebasic is pretty much just as fast and versatile.

     

     

    Best regards,

    Michael

  14. Sure, lets go for that. Both novel and movie is great, although they have some differences. I'd just like to pick up from yesterday and straighten up a few things...

     

    First of all I want to straighten out that although I consider it mandatory to use some amount of science or scientific thinking in sci-fi, I've never had any intention on writing about metriculous technical details or making my stories look like VCR manuals. When insisting on letting science play a role in sci-fi, I'm not talking about actually writing formulas in it or expecting the reader to be able to do integral math in order to understand the point of the book. We're VERY far away from that! I'll try to explain...

     

    I'm talking of a much more subtle approach to science. I'd rather think of - say - Frank Herberts "Dune", in which he actually builds up not only a plausible echological system or biosphere, but also a working society. Yet this doesn't prevent him from depicting the story's main characters with great realism and detail. The creatures and gadgets have nothing to do with real science, but that's not the point. They all have a clear reason for beeing there, and they all follow a consequent set of rules. Early in the story you have a clear idea about what's possible within the universe Herbert depicts and what's not. He doesn't suddenly introduce some new fantastic device that'll suddenly save the day - all the "pieces" were there from the beginning.

     

    The trouble with bad sci-fi is that you often can't tell where this limit of possibility lies. This often result in the use of Deus ex Machina - the sudden unexplained appearance of someone or something that saves the main characters from a bad situation and turns everything for the better. Often this is a bad way to make a story progress, but it happens often in poor fiction, probably because the writer can't think of a plausible way of doing this. In extreme cases the phenomenon is abused simply to keep people interested in a story that contains no plot whatsoever - I'd mention the "Lost" series as an example. Ever so often a new mystery is introduced in order to make the audience forget the fact that none of the earlier mysteries were ever explained or put into context.

     

    In a star-trek / star wars universe of apparently unlimited posibillity there is a potential danger that the story degrades to such a set of unlinked fantastic events. The reader is forced to accept this since anything seems possible. The writer doesn't have to explain a thing - again since anything's possible. Honestly, this seems as the lazy writers excuse not to do a proper job!

     

    On the other side, good fiction IMHO often introduces all important pieces of the story and a "set of rules" at an early stage, and then keep the readers interest caught by the way the characters interact according to these rules - and thereby often creating an unexpected result - and not by just continuously introducing new characters or gimmicks.

     

    This is pretty much what I mean when insisting on using a scientific approach in sci-fi. Since the setting - important or not - is influenced or even dictated by science, you have to think it through and compile a set of rules or set up some limitations. There has to be some sort of logic to it, but you don't have to tell the reader about it explicitly - hence my note about meticulous technical details. In a historical novel these rules are based on factual history, and likewise in sci-fi they're based on science.

    Take Asimovs Robot-series as an example. Actually it was one of his editors that compiled the three laws of robotics based on his stories - Asimov had used them from the start, but not explicitly. Scientific thinking was there from the beginning, but the reader didn't neccecarily realise it right away. Still this is what made Asimovs series good sci-fi. And this is why I really, honestly think that you must take science into consideration when writing sci-fi.

     

    Best regards,

    Michael

  15. Dammit, I just wrote a long answer to your posts and then I lost it! And now it's half past one in the night, and I'm not too keen on rewriting the whole chunk. So cut short:

     

    I think You're right, and I understand why it is so. Generally, the less technichal detail you use, the less readers you'll lose. But it really, really bothers me that you both use star-trek as an example to illustrate your point. IMHO star-trek is way too commercial, and it doesn't tell an important or even relevant story about people, science, or anything. Its been engineered to appeal to the widest possible audience to make money, and that's pretty much it. In order not to chase people away, hard science is deliberately kept at a minimum, making it as easy as possible to digest. Can you please pick a less commercial / more classical writer or story to make your point?

     

    I'll write some more in the morning. Hope I haven't started a flame-war here!

     

    best regards,

    Michael

  16.  

    - For every object in space, sum up all of the gravitational vector forces acting on it, "press" the force against your object to plot its new coordinates.

     

    Basically, that does work, but its not very efficient. If you were trying to create a computer model of gravitation using that approach, it would bring your computer to its knees, because the amount of processing overhead increases at a rate of O( (x^x) * n) for each successive movement, where x is the number of planets you're trying to model and n number of actual moves you want to make. (At just 10 objects, you're computer has to go through 10 000 000 000 loop iterations for each step).

     

    Hi there,

     

    I know this doesn't answer your question, but actually you can make this method work very efficiently. All it takes is a little extra effort when optimizing your code. I've attached some very simple example programs to prove my point. I don't know how many loops/step they spend, but it's definitely much less than the number you mention above.

     

    The first example has five hundred bodies that all interact, and it should run nicely on any newer pc.

     

    If you're simulating a system with a lot of bodies with neglible mass you can make it even faster:

     

    The second example has five thousand bodies, of which 10 have masses high enough to take into consideration.

     

    If anyone's interested in seeing some code, I`d be glad to post it and explain how it works. These examples are simple and only use 2 dimenions, but making it run in three dimensions will only make it a tad slower. I've used the same code to simulate some of the planets in our own system, and it returns some pretty accurate data. In other words there is no loss of precision due to high performance.

     

    The programs are both approx. 100 lines, and I've written them in FreeBasic.

     

    Best regards,

    Michael

    Gravity_example_1.zip

    Gravity_example_2.zip

  17. Moleke & Jackson33,

     

    I have no doubts about what you are both saying. What troubles me a bit about this is that there are other reasons for writing sci-fi than "just" tell a good story or describe exiting characters.

    I completely agree with you regarding the importance of having realistic, well-told people in your stories, but from my point of view the primary reason for writing sci-fi often is to make the reader aware of a phenomenon or problem with a scientific content.

    So, my primary reason to write the story at all is its scientific content and not its persons, however exiting they may be. Of course the plot is made relevant - made come alive - through the characters... but none the less, it is still the scientific part that is essential. If it weren't then then of cource you could pick any setting for your characters to move around in.

     

    I mean, in f.inst. H. G. Wells "the war of the worlds" it isn't the protagonists personality or actions that made the book a world classic. Another really nice example is Karel Capek's "The war with the newts", which hardly have any protagonists at all, but none the less it is an exiting, humorous and still-relevant sarcastic comment to the modern society, although it's written in the 1930's.

     

    Cut short my point is that if you really, really want to write a story about - say - the impact of supercomputers on society, you'd have to do some heavy researching and thinking about computers first - and then pick out some characters that you'd really enjoy tossing around in the setting you've made. If you spent all your energy just on making the characters realistic you'd never get around to the computer-part. And then you wouldn't have a sci-fi story... at least in my opinion.

  18. Moleke,

     

    This is SO true! I'd even say this is one of the fundamental "pillars" all good fictive writing is based on. The trouble with the science fiction genre in general is that great characters aren't enough - There has to be some technological element in the story, and it has to play an essential role in the plot. Otherwise it wouldn't be a science fiction story. So cut down to the bone: A nice universe won't carry the plot alone, but in sci fi neither will well described carachters.

     

    I think Theodore Sturgeon hit the bull's eye when saying: "A good science-fiction story is a story about human beings, with a human problem, and a human solution, that would not have happened at all without its science content." (Link)

     

    (Hmmm... since it is explicity mentioned in the first post that we're not supposed to discuss pilots here, maby some moderator could move this to a new thread?)

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.