## graphing functions – Calculate Signed Distance Field of a Dashed Line

I’m trying to calculate the signed distance field of a horizontal dashed line using a shader.
I managed a line well enough, by measuring the distance of a given uv coordinate from the y position of the line. I turned that into a line segment by clamping the x coordinate.

Now I need to add the line dashes.
I’m pretty sure I need to plot somthing like this where the line flattens out at regular intervals, jumps to the next line position when it gets closer to it and then continues on the regular slope after a set dash width.

I’m not sure how to plot this function, I tried using modulo, but I didn’t get very far.

Any help is appreciated.

Posted on Categories Articles

## interaction design – Interactive Graphing

I have a set of mathematical formulas that are more easily understood if viewed as graphs on a cartesian plane (each time fixing all of the parameters/variables but one). I want to add to a website an “applet” where users can generate those graphs and play a bit, so they can ask, for example, “how does the dependent variable u changes as a function of the independent variable x, if we fix q=0.5, a=2, beta=1.7 ?”

Ideally I would like the users to be able to:

1. decide which variable to present as a function of which other variable.
2. specify the parameter values using slide bars.
3. overlap multiple graphs like these on the same coordinate system.
4. use it without any web knowledge, of course.

Basically, I am thinking of a simple garphing calculator, like what Desmos are offering, except that it would be on our website with our design, and would have a pre-specified set of formulas to choose from.

Is there a good solution for this? (I hope this question is not too general to appear here, I can try to rephrase it more specifically if it is.)

Thanks!

Posted on Categories Articles

## python – Graphing with Pandas Data Frame with various columns I currently have the following information in a Data Frame.

I need to create a graph that compares the Budget against the Worldwide Gross of the 5 films with the highest ‘porcentage de ganancia’ (or income).
Nothing seems to be working.

Any help is greatly appreciated!

## Graphing a Normal Vector to a Plane from the origin

I’m trying to plot a normal vector to a plane. I know I’m doing something I should know better, but can’t seem to find. Vectors {0, 1, 2}, {1, 1, 3} obviously determine a plane. Their Cross Product is {1, 2, -1}, which is normal. Unfortunately this code (all from the origin):

``````Graphics3D({{Blue, Arrow({{0, 0, 0}, {0, 1, 2}})}, {Red, Arrow({{0, 0, 0}, {-1, -2, 1}})},
{Blue, Arrow({{0, 0, 0}, {1, 1, 3}})}})
``````

Yields, Which doesn’t look quite right. Just don’t trust pictures? Any thoughts appreciated. Trying a different way I found some Mathematica code from a multivariable course for normals to a plane… and I got the same thing…

## graphing functions – How to interpret numbers on the x axis?

These questions and graphs are from McGraw-Hill’s SAT Subject Test Math Level 2, Practice Test 8
I m currently preparing for coming Mat 2 subject test I couldn’t solve them , seeking for help.

For question 45 I graphed all equations in my calculator but because of the x = 3.14 , I don’t know how to interpret numeric values between 1 to 10 on x axis such as 3.14. If it s 45 , 60 , 15 , these number have trigonometric values but what are 2 , 3 , 3.14 ?
Graphing didn’t help much .

Question 45

For question 17 I typed the equation into my graphic calculator and circled C but answer keys says it s A. What s your opinion and how do you solve it ?

Question 17

Posted on Categories Articles

## Graphing Heat Equation

I was able to solve the heat equation, but am unsure of how to graph the partial sums of the solution.

The problem:

a.) Solve the heat equation subject to

``````u(0, t) = 0, u(100, t)=0, t>0

u(x, 0) = 0.8x,  0 ≤ x ≤ 50
u(x, 0)=0.8(100-x), 50 < x ≤ 100
``````

b.) Use the 3D plot application to graph the partial sums consisting of the first five nonzero terms of the solution in art a for 0 ≤ x ≤ 100, 0 ≤ t ≤ 200. Assume that k=1.6352. Experiment with various three-dimensional viewing perspectives of the surface.

I was able to get part a, but am unsure of how to code part b in Mathematica.

## How do I go about graphing the region, \$Re(z^2)>1\$ in the Complex Plane?

The questions asks to describe the region, $$Re(z^2)>1$$, graphically in the complex plane. The math is fairly simple. If we let $$z=x+iy$$, then $$z^2=(x+iy)(x+iy)\z^2=x^2-y^2+i(2xy)$$

Hence the $$Re(z^2)=x^2-y^2>1$$

Graphically speaking, this function sketches a hyperbola in the real $$xy$$ plane. However, my confusion is that the question asks to represent $$Re(z^2)>1$$ in the complex plane. How can I go about representing the real part of a function in the complex plane?

## Is there a generic way to describe this emergent behaivor in the graphing of this program?

Ok so I made a simple program using turtle in python ,basicly its a turtle enclosed in a double loop;it moves foward a bit and then it moves right x where x is equal to 1,1,2,1,2,3,1,2,3,4,,etc for those who understand pseudocode its the following

``````for i from 1,2500:
for x from 1,i:
turtle.fw(1) //Or something smaller to zoom out
turtle.right(x)
``````

now it makes the following pretty random just a lot of spirals, but if I zoom out by a factor of a hundred… it makes a beautiful pattern, how does this patter emerge out of a random set of spirals? Also If you change`turtle.right(x)` to `turtle.right(x*80)` it makes this: still preaty random.. however if you zoom out by 10 this patern emerges: Anyway I am not very expirienced in the subject of math however I think this could be quite interesting! I tried putting different x*n and most of the times it makes defined shapes I changed the code to javascript so if anyone wants to edit it and see what patterns emerge you can do that Here just edit `y=71` to any number you wish, I have Checked that any repetitive 8’s make an incredible patern (8,88,888,etc) and that repetitive nines always make a straight line. If anyone has any idea why this patterns emerge or have any idea even what subject or sector of math invesigates 2d patterns from simple instructions It would be of great help!

Posted on Categories Articles

## linux – How to send monitor data packets over the network for graphing?

I need to remotely monitor an embedded Linux system for metrics like CPU/memory/disk etc. Not just the realtime data but also historical data. The system is running an very old kernel which means it’s very hard to port modern monitoring tools like netstat or collectd to it.

I am wondering whether there is a simple way to do the data collection only and broadcast the data to the network? Then the heavy lift of data storage and visualization can be done on the PC side.

Posted on Categories Articles

## plotting – Graphing a circle with vectors/arrows

``````divs = Transpose @ Through @ {Cos, Sin} @ Subdivide[0, 2 Pi, 32];
{r1, r2} = {2, 3};

Graphics[{Blue, Circle[{0, 0}, r2], Red, Circle[{0, 0}, r1],
Arrow[{r2 #, r1 #}] & /@ divs, Arrow[{{0, 0}, r1 #}] & /@ divs}, 