Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    I assume replacing a wall means the removing of a hole/light source. The requirements then are to restore the light intensities to what they were before the hole was made and to consider any changes...
  2. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    Is that comparing the square at x,y with its adjacent squares and using the value - 1 of the light intensity of the square at x,y?

    For testing I'd recommend a small 2D array with a given hole. Run...
  3. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    There are up to 8 near adjacent spaces. What is the level that is to be set for those squares?
    What about the next set of spaces in the surrounding ring? and the next one out?
    What happens when at...
  4. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    If you know how the light spreads, you should be able to describe the algorithm in words to get a design for writing the code.

    What are you trying to get from this thread? I thought you wanted to...
  5. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    That's what we've been working on. Start with this one question:
    What are the rules for setting the lightedness for squares when there is a light source (hole) at a square in the array?
  6. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    That would be a part of the algorithm.
  7. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    If you have the algorithm for how to set the intensity for squares when a hole is made,
    and have written the code for it,
    can you explain what your problem is?
  8. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    So, the code is working with 2D arrays.

    What are the rules for setting the lightedness for squares when there is a light source (hole) at a square in the array?
    How do those rules change when...
  9. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    Will the code be working with 2D arrays?
    Then it should be easier when talking about what the code is supposed to do to use 2D arrays of digits as I posted in post#20

    Sorry, I don't connect to...
  10. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    I think it'd be easier to visualize if you used a 2D array of digits to show the light intensities for each square.
    For example:
    00100
    00300
    13531
    00300
    00100
  11. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    What is the algorithm for computing the intensity for adjacent squares?


    Can you give an example of a square that has two holes near it, one closer than the other on different sides.
    Does what...
  12. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    That would mean that there would have to be several passes made for a square to see which hole is closer and brighter to know which hole to use to set the light for that square.
    Seems like the...
  13. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    Would the light intensity be decreased for each "ring" of squares around the hole?
    The first ring could have 8 squares.
    The next ring could have 18(?) squares
    The next ring could have 26(?)...
  14. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    Does that mean the light goes past the adjacent squares? What determines how many squares it goes to?
  15. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    Ok. If there is a hole, the light shines full strength there and with a -1 power at the (up to) 8 adjacent squares.
  16. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    Ok, what needs to be considered as you work on the logic for the program?
    What determines what spaces are lite by other sources? How will the code detect that condition and react correctly?
  17. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    What logic does the code need to do that?
  18. Replies
    38
    Views
    4,842

    Re: Java light source simulation

    Can you explain the logic that you are trying to write code for?
    For example what does this mean:
    What is a "corrrect update" and how is it related to the light power?
Results 1 to 18 of 18