Variable to control bezier points in a line for graph in PaintCode - paintcode

I have just started to use PaintCode some days ago and did all the tutorials but I am banging my head against a very simple task.
I have created a temperature plot with a Bezier and I want to assign a variable to each day so that the point coordinates will be proportional to the temperature.
What is the best way to achieve this? I cannot control the individual Bezier points so I can only move all the curve which is not what I want to achieve.

You can attach variable to single bezier points. Double-click the bezier to enter editing mode, then select some point and then you can attach variables to the text fields for its X and Y coordinates.

Related

Making Elevation-distance plot

I have some latitude and longitude of some points. I want to make an Elevation-distance plot using python. I have a code which can plot elevation vs distance plot between two points, but doesn't know how to make if there is more than one point?
Note these points are not in a Straight line.
https://www.geodose.com/2018/03/create-elevation-profile-generator-python.html

Calculate geometry of Reference Point

I have 4 placement points which I am using to create a outer panel. However, I have reference points which I want to use it for creating inner panel inside the outer panel. I have offset values available from each side of the outer panel. Now I want to calculate coordinates for the inner panel using Revit API/ geometry.
Any help would be greatly appreciated.
If you're asking to calculate new coordinates from coordinates and a specific offset, you're asking more of a Geometry question. http://www.purplemath.com has tons of great information about doing those calculations.
If it's always a set (x, y) offset you simply add, or subtract, the x-offset to the coordinate.x, and same for the y value. If it's anything other than 90 degrees, though, you'll need to start looking at the Y-Intercept Form and all that Geometry/Trigonometry math.

Drawing a circular, minor arc given the centre point and two other points

Does anyone know how to draw a circular, minor arc given the centre point and two other points that lie on the circle?
I want to draw the pixels directly to the screen, and preferably, not have to calculate the angles.
I am using SDL and C, but may be OK studying code given that uses a different language.
Thanks.
All points on a circle are equal distance to the centre.
Given you know two points on the circle you can calculate this distance.
Assuming you have cartesian coordinates, for every x or y value between the known points calculate the other value so that the point is equal distance to the centre and plot these points.
I think this is conceptually the easiest way, though not the most efficient.

Finding a point clicked in a grid

Given this grid ( http://i.stack.imgur.com/Nz39I.jpg is a trapezium/trapezoid, not a square), how do you find the point clicked by the user? I.e. When the user clicks a point in the grid, it should return the coordinates like A1 or D5.
I am trying to write pseudo code for this and I am stuck. Can anyone help me? Thanks!
EDIT: I am still stuck... Does anyone know of any way to find the height of the grid?
If it is a true perspective projection, you can run the click-point through the inverse projection to find it's X,Z coordinates in the 3D world. That grid has regular spacing and you can use simple math to get the A1,D5,etc.
If it's just something you drew, then you'll have to compare the Y coordinates to the positions of the horizontal lines to figure out which row. Then you'll need to check its position (left/right) relative to the angled lines to get the column - for that, you'll need either coordinates of the end-points, or equations for the lines.
Yet another option is to store an identical image where each "square" is flood-filled with a different color. You then check the color of the pixel where the user clicked but in this alternate image. This method assumes that it's a fixed image and is the least flexible.
If you have the coordinates of end points of the grid lines then
Try using the inside-outside test for each grid line and find the position
Since this grid is just a 3D view of a 2D grid plane, there is a projective transform that transforms the coordinates on the grid into coordinates on the 2D plane. To find this transform, it is sufficient to mark 4 different points on the plane (say, the edges), assign them coordinates on the 2D plane and solve the resulting linear equation system.

knot points at specific points in the chart

How do I mark knot points at specific points on the curve not all. For example, I plot the following curve -
(x1,y1)
(x2,y2)
(x3,y3)
(x4,y4)
(x5,y5)
I want to mark knot points on x2 and x4. Is there some way to do this?
Make two data series, one with all points, another with the points you want marked. Format the first (all points) to display the line without markers, and the second (selected points) to display markers without the line.

Resources