Yes, and that is what the Lorentz transformations are about. Their basic forms are very simple too.
The Lorentz transformation formulas to get x' and t' are
x' = γ(x-vt)
t' = γ(t-vx/c
2)
to get back, you would use the inverse Lorentz transformations formulas
x = γ(x'+vt')
t = γ(t'+vx'/c
2)
γ=1/(√1-v
2/c
2) = 1.25 for v=0.6c
x: space position of event (where is it located)
t: time position of event (when does it happen)
v: The relative velocity
c: The speed of light
see more here
https://en.wikipedia.org/wiki/Lorentz_transformation
Those formulas can be derived mathematically just by the two postulates of SR
1) The laws of physics are the same in every inertial frame of reference (no IFR is special compared to another)
2) The speed of light is always c in a vacuum absent of gravity (independent on which inertial frame of reference frame you observe a beam of light, you will always observe it traveling at c, independent of the velocity of the emitting source)
(note that the formulas also depend on where you choose to locate the positive and negative x-axis within the two reference frames/coordinate systems)
And just by knowing how to apply those formulas, you can create the simulation of the twin paradox i programmed, i already linked at an earlier post. Scroll back if you missed it or click here
https://www.physicsforums.com/threads/second-opinion-needed.906688/page-3#post-5710416
Try to apply the formulas by taking any event x, t on the left x-t diagram in my simulation at any time you wish and then see if you get the right x', t' values for the right diagram for the event.
Take an event in the right x-t diagram of my simulation and apply the inverse Lorentz transformation formulas and see if it maps properly in the left diagram.
For example, let's take the white filled circle in the screenshot i made.
It is located at x=6ls, t=0s in the left diagram
x' = 1.25*(6ls - (-0.6c)*0) = 7.5ls
t' = 1.25*(0 - (-0.6c)*6ls/c
2) = 4.5s (you won't have to deal with c
2 as -0.6c*6cs (lightsecond/ls) /c
2 shortens to -0.6*6s)
Now that makes me look like a liar, because in the right diagram, the white filled circle is always located at x=0, t=0 (or x'=0 , t'=0 if you wanted to be in accord with how this is usually defined - in my simulation it is x and t for both sides)
But that is intentionally. The observer in the right diagram can always draw the x-t diagram such that he is in the middle, and map all events relative to that.
Check where the teal filled circle is in the right diagram. It is at x' = -7.5ls, t' = -4.5ls
So i could have drawn the right x-t diagram such that the teal circle is at x'=0, t'=0 and instead the white circle would be at x' =7.5ls and t'=4.5s as calculated with the Lorentz transformations but since i wanted to draw it from the perspective of the traveling twin, hence him mapping all events relative to him as he "travels", this seemed the more appropriate way to do the simulation.
Think of the right diagram as the traveling twin (white filled circle) drawing x-t diagrams periodically along his travel. In those x-t diagrams he maps the spacetime location of every event relative to himself while placing himself at x=0, t=0 within the diagram.
Afterwards he creates an video animation of those diagrams. The right diagram is what you would get.
And that is all you need basically to create the simulation i created. That, and some petty coding skills like mine, willing to stare at code for hours without writing a line.