Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Coordination system
Forum Update on Monday, May 27th 2025

Coordination system

Scheduled Pinned Locked Moved Unsolved General and Desktop
15 Posts 4 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Loc888
    wrote on last edited by
    #1

    Hi, i need to create something like this:

    https://tinypic.pl/07x1zhlsb7hl

    There are two axis, and the values are dependent by the specific values on the axis, and the curve, i don't have any idea how to create it, since i need to fill the values one by another, and there can be an infinitive amount of them, it's something like coordination system, if someone could give me any idea how to do it, most likely i don't need any widgets to show it, because it will be all "virtual".

    jsulmJ 1 Reply Last reply
    0
    • L Loc888

      Hi, i need to create something like this:

      https://tinypic.pl/07x1zhlsb7hl

      There are two axis, and the values are dependent by the specific values on the axis, and the curve, i don't have any idea how to create it, since i need to fill the values one by another, and there can be an infinitive amount of them, it's something like coordination system, if someone could give me any idea how to do it, most likely i don't need any widgets to show it, because it will be all "virtual".

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Loc888 Sounds like you're looking for https://doc.qt.io/qt-5/qtcharts-index.html :-)

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      L 3 Replies Last reply
      1
      • jsulmJ jsulm

        @Loc888 Sounds like you're looking for https://doc.qt.io/qt-5/qtcharts-index.html :-)

        L Offline
        L Offline
        Loc888
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • jsulmJ jsulm

          @Loc888 Sounds like you're looking for https://doc.qt.io/qt-5/qtcharts-index.html :-)

          L Offline
          L Offline
          Loc888
          wrote on last edited by
          #4

          @jsulm Ok i try with that, but i think i will need some help, depends.

          1 Reply Last reply
          0
          • jsulmJ jsulm

            @Loc888 Sounds like you're looking for https://doc.qt.io/qt-5/qtcharts-index.html :-)

            L Offline
            L Offline
            Loc888
            wrote on last edited by Loc888
            #5

            @jsulm If i just add QT += charts, then i get the error, there is no module like that, i have Qt 5.23.

            One more thing, like i said, i don't have to show it, i just need to generate the data.

            jsulmJ J.HilkJ 2 Replies Last reply
            0
            • L Loc888

              @jsulm If i just add QT += charts, then i get the error, there is no module like that, i have Qt 5.23.

              One more thing, like i said, i don't have to show it, i just need to generate the data.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Loc888 Qt Charts is not part of a standard Qt set-up. You need to install it first (use Qt Maintenance Tool for that).

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              L 1 Reply Last reply
              0
              • jsulmJ jsulm

                @Loc888 Qt Charts is not part of a standard Qt set-up. You need to install it first (use Qt Maintenance Tool for that).

                L Offline
                L Offline
                Loc888
                wrote on last edited by
                #7

                @jsulm Ok, can i generate the data there, or it's it will just show it?

                jsulmJ 1 Reply Last reply
                0
                • L Loc888

                  @jsulm Ok, can i generate the data there, or it's it will just show it?

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Loc888 I'm not sure what you mean with "generate the data"?

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • L Loc888

                    @jsulm If i just add QT += charts, then i get the error, there is no module like that, i have Qt 5.23.

                    One more thing, like i said, i don't have to show it, i just need to generate the data.

                    J.HilkJ Offline
                    J.HilkJ Offline
                    J.Hilk
                    Moderators
                    wrote on last edited by J.Hilk
                    #9

                    @Loc888
                    generate the data ? You mean to want to know of a convenient way to store a pair of varibales in a list?

                    There are countless ways to do that.

                    In this object specific case I would suggest using QVector2d as the container for the x/y pair and a simple QVector<QVector2d> as the "list"


                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                    Q: What's that?
                    A: It's blue light.
                    Q: What does it do?
                    A: It turns blue.

                    L 1 Reply Last reply
                    1
                    • J.HilkJ J.Hilk

                      @Loc888
                      generate the data ? You mean to want to know of a convenient way to store a pair of varibales in a list?

                      There are countless ways to do that.

                      In this object specific case I would suggest using QVector2d as the container for the x/y pair and a simple QVector<QVector2d> as the "list"

                      L Offline
                      L Offline
                      Loc888
                      wrote on last edited by Loc888
                      #10

                      @J.Hilk You don't understand what i mean, i explain, if i put into a vector (10,20), (20,40), (40,60), then they are just 6 values in total, in any coordination, when the object moves, there are infinitive combinations.

                      If i have a line, the length is 50units ok?
                      The problem is, if someone will point somewhere in the middle, then where it is? It's something close to 25unit of 50, because the total length is 50, but there are a lot of combinations, and if i wanna use any decimal points, then i just can't add to the vector 500000 values, i need something to "generate it".

                      What i want is, somebody points in the middle of the line, middle is 25, half of that distance is 12.5, beginning is 0 and the end is 50, and keep going, wherever somebody points, i get the coordination, i don't want a fixed size vector.

                      mrjjM 1 Reply Last reply
                      0
                      • L Loc888

                        @J.Hilk You don't understand what i mean, i explain, if i put into a vector (10,20), (20,40), (40,60), then they are just 6 values in total, in any coordination, when the object moves, there are infinitive combinations.

                        If i have a line, the length is 50units ok?
                        The problem is, if someone will point somewhere in the middle, then where it is? It's something close to 25unit of 50, because the total length is 50, but there are a lot of combinations, and if i wanna use any decimal points, then i just can't add to the vector 500000 values, i need something to "generate it".

                        What i want is, somebody points in the middle of the line, middle is 25, half of that distance is 12.5, beginning is 0 and the end is 50, and keep going, wherever somebody points, i get the coordination, i don't want a fixed size vector.

                        mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        @Loc888
                        Hi
                        The chart you have shown does not have straight lines between the points.
                        Is that really the case or will it be straight lines ?

                        L 1 Reply Last reply
                        0
                        • mrjjM mrjj

                          @Loc888
                          Hi
                          The chart you have shown does not have straight lines between the points.
                          Is that really the case or will it be straight lines ?

                          L Offline
                          L Offline
                          Loc888
                          wrote on last edited by
                          #12

                          @mrjj Idk what you mean, and it doesn't matter, because like i said, i am not gonna do any chart, before i have the data.

                          mrjjM 1 Reply Last reply
                          0
                          • L Loc888

                            @mrjj Idk what you mean, and it doesn't matter, because like i said, i am not gonna do any chart, before i have the data.

                            mrjjM Offline
                            mrjjM Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13

                            @Loc888
                            Hi
                            Ok.
                            If the lines are indeed straight between the point you can use
                            a formula to calculate the any Y from a given x.

                            L 1 Reply Last reply
                            0
                            • mrjjM mrjj

                              @Loc888
                              Hi
                              Ok.
                              If the lines are indeed straight between the point you can use
                              a formula to calculate the any Y from a given x.

                              L Offline
                              L Offline
                              Loc888
                              wrote on last edited by Loc888
                              #14

                              @mrjj Doesn't matter, i did +/- what i want. I wanted something like this:

                              Object is at 25000, speed of movement is 30u/s, if the speed is > 50, the deceleration will be -0,50u for example.

                              Then move it, that's what i get:

                              New deceleration: -0.00734294 for: 33.1444
                              New deceleration: -0.00734131 for: 33.1371
                              New deceleration: -0.00733968 for: 33.1297
                              New deceleration: -0.00733806 for: 33.1224
                              New deceleration: -0.00733643 for: 33.1151
                              New deceleration: -0.00733481 for: 33.1077
                              New deceleration: -0.00733318 for: 33.1004
                              New deceleration: -0.00733156 for: 33.0931
                              New deceleration: -0.00732993 for: 33.0857
                              New deceleration: -0.00732831 for: 33.0784
                              New deceleration: -0.00732668 for: 33.0711
                              New deceleration: -0.00732506 for: 33.0637
                              New deceleration: -0.00732344 for: 33.0564
                              New deceleration: -0.00732182 for: 33.0491
                              New deceleration: -0.00732019 for: 33.0418
                              New deceleration: -0.00731857 for: 33.0344
                              New deceleration: -0.00731695 for: 33.0271
                              New deceleration: -0.00731533 for: 33.0198
                              New deceleration: -0.00731371 for: 33.0125
                              New deceleration: -0.00731209 for: 33.0052

                              I have only few values, starting speed, starting speed loss, and the destination, and all the others, are calculated, that's what i wanted.

                              mrjjM 1 Reply Last reply
                              0
                              • L Loc888

                                @mrjj Doesn't matter, i did +/- what i want. I wanted something like this:

                                Object is at 25000, speed of movement is 30u/s, if the speed is > 50, the deceleration will be -0,50u for example.

                                Then move it, that's what i get:

                                New deceleration: -0.00734294 for: 33.1444
                                New deceleration: -0.00734131 for: 33.1371
                                New deceleration: -0.00733968 for: 33.1297
                                New deceleration: -0.00733806 for: 33.1224
                                New deceleration: -0.00733643 for: 33.1151
                                New deceleration: -0.00733481 for: 33.1077
                                New deceleration: -0.00733318 for: 33.1004
                                New deceleration: -0.00733156 for: 33.0931
                                New deceleration: -0.00732993 for: 33.0857
                                New deceleration: -0.00732831 for: 33.0784
                                New deceleration: -0.00732668 for: 33.0711
                                New deceleration: -0.00732506 for: 33.0637
                                New deceleration: -0.00732344 for: 33.0564
                                New deceleration: -0.00732182 for: 33.0491
                                New deceleration: -0.00732019 for: 33.0418
                                New deceleration: -0.00731857 for: 33.0344
                                New deceleration: -0.00731695 for: 33.0271
                                New deceleration: -0.00731533 for: 33.0198
                                New deceleration: -0.00731371 for: 33.0125
                                New deceleration: -0.00731209 for: 33.0052

                                I have only few values, starting speed, starting speed loss, and the destination, and all the others, are calculated, that's what i wanted.

                                mrjjM Offline
                                mrjjM Offline
                                mrjj
                                Lifetime Qt Champion
                                wrote on last edited by
                                #15

                                @Loc888
                                ok, so it was some form of speed calculation. :)

                                1 Reply Last reply
                                0

                                • Login

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Users
                                • Groups
                                • Search
                                • Get Qt Extensions
                                • Unsolved