Jump to content

krusty

Members
  • Posts

    13
  • Joined

  • Last visited

Posts posted by krusty

  1. Thanks for replying.

     

    You have gone through allot of trouble to answer my question but unfortunately I still don't understand.

     

    I probably have to go back to the roots and discover 'why a matrix' and 'how does a transformation matrix relate to the values it is designed to change and move' etc.

     

    I'm completely stumped on why we stack the numbers one top of each other in a matrix form. I would assume that we do so because in that form it can be seen how the values in a transformation matrix interact with a vector describing a shape or line on a cartesian plane. It's one thing to know how to do the calculations but to really understand it, I'm not sure how I can get to that point ;(

     

    Where do I even start to get an understanding of why we even utilize a matrix?

     

    Thanks and sorry to be a big best. I have no doubt others will benefit from this as well.

  2. I'm having a horrendous amount of trouble understanding Vector Matricies. I think what really stumps me is this:

     

    If I have a 3x3 vector like this:

     

    1 0 0

    0 1 0

    0 0 1

     

    Or to apply a value to each I would put: (which is probably technically wrong)

     

    a d g

    b e h

    c f h

     

    I understand if I have a vector representing a shape on a Cartesian plane and I want to

    translate, rotate, refect or something else it.... :

    The vector could look like this: (I'm not sure what the 3 would represent)

     

    5

    2

    3

     

    ......I can multiply or add the 3x3 matrix to it and by changing the values a to h I can effectively translate, rotate, reflect or the matrix to a more or lessor degree. (I have no doubt made technical errors even in my explanation)

     

    My question is.... what does each value in the matrix stand for? Is 'a' always a number I would change to translate the shape along the x axis and 'd' a value I would change to move a the shape a along the 'y' axis. I'm having trouble understanding why we even represent these numbers in a matrix form?

     

    Is there a really basic explanation out there which could help me understand this? Despite hours of reading on the web, I'm having trouble knowing how to even begin understanding them.

     

    Thanks

     

     

     

  3. This is where I'm getting confused. I understand C Strings though probably not in the light that I need to.

     

    The table below comes from the wikipedia link: http://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch .

    This is related to LZW compression and decompression. If you look at the Decoding table down the third column under output sequence at the point where it says 'OR', the first column says that the bit sequence represents 'OR' is 011111 . How does on get to this. Let's assume the table at the top of the attached link is the ascii equivalent in numerical form. A through to Z.

     

    How does: O (01111) and R(10010) become 011111 or "OR". I realise if you just slide them into each other you get 011111, but try doing that to "EO" where 'E' (00101) and 'O' (01111) becomes "EO" (011110). How was "EO" represented in Binary using the individual characters?

  4. Thanks for the help so far. What I was asking is that a string in C++ is 4 bytes on a 32 bit system.

     

    Therefore, if I have a string variable as per above this 4 byte string is still 4 bytes after I initialize it with "The quick brown fox jumps over the lazy dog". But you say the 4 byte string contains pointers to each character (yes sorry it is 43 characters). So 4 bytes string actually takes up allot more memory than 4 bytes? Is that right ?

  5. Hmm. But how is it that a 4 byte string can I fit a string? For example in C++ I would declare a string and present it as per the below. If it's 8 bits per character then I would need 26 x 8 bits to store this string?

    #include<iostream>
    #include<string>
    using namespaces std;
    int main()
    {
    string mystring = "The quick brown fox jumps over the lazy dog";
    
    cout << mystring << endl;
    
    )
  6. You might say I'm the guy who caught on last, but I have to confirm this with the experienced souls out there to check if I'm on the right track.

     

    I've always been confused about binary representations of strings.

     

    For example. I have never understood why the string "OR" where ASCII character O = 15 and R = 18 in binary.

    So if I want to represent this string in 5 bits I always thought you would have to to this.

     

    01111 10010 for O and R respectively. Can you imagine the space required if I'm building a computer smile.png .

     

    I've just realized that bitwise operation OR as in 'O' OR 'R' gives me the correct 5 bit representation of the string "OR" because 'O' or 'R' (01111 or 10010) = 11111. Is my assumption correct here? .. But this doesn't work in every case. I'm therefore still confused how to represent a string with only a limited number of bits, 5 in this case?

     

     

     

    If this is the case then how do I extract the 'O' and the 'R' from the binary representation of "OR" or binary value 31? Is this via bit masking operations?

     

    Thanks

  7. If you will use 3rd party library, you will learn how to link against linkable (or dynamic) library, not compression/decompression algorithm.

     

    If you want to learn something useful, try making compression/decompression algorithm by yourself.

     

    If it's job ordered by somebody, and you will use 3rd party library, you might break license agreement they want to maintain. Some 3rd party library authors disallow selling software made with them (only share, or only share with open source depending on lib). That's mentioned in their license.

     

    Hmm. Now I'm really lost ?

     

    I see what you mean about learning about the library though. It also answers why I would not need to completely understand the algorithm in question. This is no commercial job, it's my own little project. I'm just trying to understand more about using open source libraries for this sort of thing.

  8. I'm rather stuck in my attempt to try to learn something.

     

    I want to learn how to implement data decoding and encoding for compression purposes primarily for decoding text streams in PDF files. I have read the pdf reference though it doesn't teach me what I'll need to know. I didn't for a minute think it would.

     

    I'm stuck in my understanding of this. In order to decode text streams there are a number of different encoding algorithms used, which can depend on the age of the pdf document. I know that in allot of cases now, for text streams, FlateDecode is common so the open source library zlib can be used for this purpose. There are a number of other different encoding standards such as LZW, Ascii base 85 as well, maybe others (this is just off the top of my head).

     

    I'm told that in order to implement a way of decoding these text streams I will need to learn the maths behind the algorithms used in each case, but I'm not sure why that is so important. If I'm implementing an open source library for encoding/decoding streams then surely it's just a matter of implementing the correct functions to decode the stream. Why would learning the maths behind it be important?

     

    The second part of my question is, are there open source libraries for decoding Ascii encoded streams such as Ascii base 85 encoded streams? I'm clearly having allot of trouble starting out in decoding and encoding compressed streams, so if there's any advice on what to start learning to get the ball rolling it would be greatly appreciated. I do understand some of the different ways things can be encoded, huffman etc, but is there a book out there or something which helps tackle or at least introduce one to actually implementing encoding and decoding libraries in C++ .

     

    Thanks

  9. If it requires significant speed to be useful, C is the obvious choice. C is also, in my experience, rather painful to use.

     

    If you want something relatively simple that can do the modeling (just not as quickly), try Python. It's fairly simple to learn and you can probably find pre-existing Python code that'll help you do what you want. O'Reilly's Learning Python is a good place to start.

     

    Hi

     

    Just wondering why you would choose C over C++?

×
×
  • 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.