DesignCAD Theory of Parallel Visibility

Started by prl, April 14, 2014, 06:44:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Lar

Quote from: prl on April 15, 2014, 10:37:18 AM
  If one can identify the equations that define it, you can exploit it with code.
Ok... And I see the value in what you are doing (seeing that DT *promises* something for v24).

I never thought about using code to find the viewing focal point. I just set it where ever I need it using the following macro:

'Macro to set the focus of the window on a point set by the user then allows the user to rotate the view around that point (otherwise dcad will rotate the view on the last focus point set by the user or the startup default which is somewhere as yet undetermined.
'Lar... last save 2Sep12
'31Sep12: added lines in case in 2d mode...

if sys(344)=1 then  'if 2d mode then inform the user this macro is not for 2d...
message "Sorry, this macro is not for 2d since you won't be able to rotate the view..."
end
end if

setpoint "Set 1 Point for Viewer Focus..." 1
pointval x, y, z, 1

>SetViewerPoints
{
<pointxyz [x,y,z]
}

>SetView
{
}


I have another one for setting the focus at the center of a group of selected objects but it has some confusing options for fitting the selection to the window and/or orbiting so I won't post it.

Lar

prl

#31
Quote from: Dean on April 15, 2014, 11:02:38 AM
Check that in your rev5 file, That you posted

Dean, good point.  Let's start with this version.  I post the rev6 drawing with pics of how I saved it and how it opens on my machine.  The second picture is with the vcz=1000 view activated (which hides the cube).  The xzy triad is positioned at global 0,0,0.  The green cube is at z=0. 

And your videos, watching them enlarged lets me clearly see what you are doing, and I appreciate that.

prl

#32
Quote from: Lar on April 15, 2014, 11:10:02 AM
Ok... And I see the value in what you are doing (seeing that DT *promises* something for v24).

An interesting topic for me to chew on.  Plus the way Dean has changed the view center location has literally changed the equation or the equations I'm guessing at.

With the original view center at 0,0,0, we have in essence a clipping plane cube (six sides) of +1250 minus - 1250 = 2500 about 0,0,0.   Since what we are doing in the +- z direction also holds true for the right view (+- x) and top view (+- y).

But what Dean has identified is that the clipping cube is no longer a cube.  If the view center is at 0,0,1000,  the clipping cube is longer in the z direction than it is in the x and y direction.  Specifically it now has an effective z length of 4500 even though in the other two axes it is still tied to zero and hence 2500 (plus or minus 1250 each side of zero).  So the clipping plane box is 4500 deep, 2500 tall, and 2500 wide or so I'm guessing since I haven't actually tested all those positions at this point.

Dean

Quote from: prl on April 15, 2014, 12:28:01 PM
Quote from: Dean on April 15, 2014, 11:02:38 AM
Check that in your rev5 file, That you posted

Dean, good point.  Let's start with this version. 

that's it maestro.. rev6 works as expected
DesignCad 3D max 2021
Lenovo 17.3"Laptop Intel(R) Core(TM) i7-9750H CPU @ 2.6GHz/Turbo boost 6 cores 12 threads.16GB memory.SSD 256GB/HDD 1TB 7200 Rpm.Nvidia Graphics GeForce GTX 1660 Ti 6GB
Windows 10 Home 64 bit

samdavo

Quote from: prl on April 14, 2014, 06:44:53 AM
Hypothesis: 

In parallel viewing mode, all objects in the DesignCAD universe at a distance greater than 10,000/sys(32) from the view center when viewed in front view, side view or more generally, any direct view, will be rendered invisible when viewed in accelerated shaded or hidden modes.
Prl,
I note that Sys(32) is defined as follows, together with a warning (?) :-
QuoteSys(32) =  Drawing unit size [0<=x<=10e6]
Note: Sys(32) is used internally by DesignCAD as scale factor for certain operations. Change it
only with extreme caution. Careless use can destroy a drawing's data.

Anyway, would it fair summary :-
a) for parallel views, to set sys(32) low, to have long view without things disappearing (not that I understand the implications thereof).
Or otherwise beware of the accelerator?

b) for perspective to generally have View Distance large because 0.5xVD back from View Centre is all that is visible there. 
(?)

prl

#35
Quote from: samdavo on April 16, 2014, 12:42:58 AM
Anyway, would it fair summary :-
a) for parallel views, to set sys(32) low, to have long view without things disappearing (not that I understand the implications thereof).
Or otherwise beware of the accelerator?
b) for perspective to generally have View Distance large because 0.5xVD back from View Centre is all that is visible there. 
(?)

Hi Sam, believe it or not I was or will eventually circle back to your topic.  Actually it was your kaleidoscope drawing that got me going on the sys32 relationship variable.  The drawing you attached and I was fiddling with had sys(32)=4  and just as you indicated,  things where happening at 2500 (even in parallel mode).

So your above summary is correct.  If sys(32) is say 0.5, your effective viewing range about 0,0,0 is 2x20,000=40000.  Your second conclusion is also correct; this being an acceleration graphics mode issue.  Doesn't seem to appear in the unchecked render modes as far as I know.

samdavo

#36
Lol
Don't tell anyone, but when I started that kaleidoscope thread, I couldn't work out what the hell was happening. :)
Finally I realised that hatches (hatched targets in that case) don't behave like anything else.
If you found a use for that thread, then well done, and that is probably a first lol.

(please remember that I warned in the first post on that thread that it was intended as a visual adventure, enjoy it or ignore it) :)

PS  Hatched targets recede either side of the "warp plane" - weird enough,  but
Text likewise  (?) .   

prl

Quote from: samdavo on April 16, 2014, 02:54:23 AM
Don't tell anyone, but when I started that kaleidoscope thread, I couldn't work out what the hell was happening. :)

Ha.  My normal mode when using DesignCAD and it doesn't do something the way I expect (and I can't understand it), is I make a mental note of "prl don't do that dummy" and then in the future I make wide detours around the specific DC weirdness,  kind of like a kid reaching up and burning himself on the stove.   That's what I've been doing for years with the strange viewing effects, even in parallel viewing mode.  Always assumed it was a DC built-in oddity or I was simply too dumb to get it,  or both.

Seems we're making a little headway at at least roughly categorizing the viewing anomaly behavior, a little like reverse engineering the DesignCAD universe and the presence of blackholes.  Can you tell I watched too much astrophysics stuff on the TV lately?  That's what spurred the pompous title, something one can use for a PhD dissertation or Noble Prize for DesignCAD.   :)

prl

Once I get a better handle on the equations, I'll produce some animated gifs exploiting the viewing holes.  In the meanwhile, attached is a screen movie.  It uses the excellent vdd.d3m routine by Bdeck.   I've created a blue sphere and around it I put the 2500 square max viewing limits cube.  I start spinning the camera in perspective mode and then switch to parallel mode.  DesignCAD is cutting the viewing cube letting you see the sphere.

samdavo

#39
Looking at that video,  you are losing parts of BOTH front and back walls in parallel mode (as you explained)   - In a similar fashion, I imagine that is why there was a hole clear through the sphere back there - both front and back - (refer the enclosed for a reminder).   Finally the penny drops :)

prl

Quote from: samdavo on April 16, 2014, 04:19:55 AM
I imagine that is why there was a hole clear through the sphere back there - both front and back - (refer the enclosed for a reminder).   Finally the penny drops :)

Yes.  Now how this all ties into the view depth distance number while in perspective viewing mode, that quantum leap or "wormhole trip",  from DC parallel universes to DC perspective universes, I still don't get.  But I'm sure there is some sort of relationship.

prl

#41
Well not that this is of any use at the moment, but it is interesting.  I placed a green sphere behind the red box.  When the movie starts, it is a font view and I spin around the Y, then I start spinning around various x and z axes also.  Interesting how the green sphere comes and goes but you will never see it through the openings in the red cube because everything behind the back red cube opening is always hidden, aka, the DesignCAD universe version of a black hole.

File attached for those that want to take it for a spin!

Dean

DesignCad 3D max 2021
Lenovo 17.3"Laptop Intel(R) Core(TM) i7-9750H CPU @ 2.6GHz/Turbo boost 6 cores 12 threads.16GB memory.SSD 256GB/HDD 1TB 7200 Rpm.Nvidia Graphics GeForce GTX 1660 Ti 6GB
Windows 10 Home 64 bit

prl

Quote from: Dean on April 16, 2014, 09:52:19 AM
How are you spinning around?

Using a tweaked version of bd's vdd.d3m.   I took out the stops for the spinning around the x axis.  In other words, I can keep spinning rather than stopping at the north and south poles.

Dean

The camera or the objects are spinning in his script?
DesignCad 3D max 2021
Lenovo 17.3"Laptop Intel(R) Core(TM) i7-9750H CPU @ 2.6GHz/Turbo boost 6 cores 12 threads.16GB memory.SSD 256GB/HDD 1TB 7200 Rpm.Nvidia Graphics GeForce GTX 1660 Ti 6GB
Windows 10 Home 64 bit