Author Topic: DesignCAD Theory of Parallel Visibility  (Read 7260 times)

prl

  • Hero Member
  • *****
  • Posts: 3389
  • A Bézier Extrusion
DesignCAD Theory of Parallel Visibility
« on: April 14, 2014, 06:44:53 AM »
Pretty fancy title.   (I'm discussing/verifying a viewing bug.)

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.

What the above means.  Open a new drawing, use unitless or ft as your base drawing unit, draw a cube any size, position it at more than 1250 units in the z direction from the view center so that all portions of the cube are beyond 1250 units, go to  front view, and shade or hidden line view it.  Should be invisible.

Of course, I could be wrong, hence the challenge. Please attach a model file for me to play with it you get it to work.


Edit: added a demo file of my own and some graphics.  The red object complies with the above hypothesis and is rendered invisible. This topic was spawned by the investigation Phil and Sam have going with the perspective view depth.

« Last Edit: April 14, 2014, 01:53:47 PM by prl »

magic

  • Hero Member
  • *****
  • Posts: 1329
  • hokus pokus
    • Magic Systems
Re: DesignCAD Theory of Parallel Visibility
« Reply #1 on: April 14, 2014, 07:46:16 AM »
Hi prl,

Is this, what you want?
It's a kind of magic!




prl

  • Hero Member
  • *****
  • Posts: 3389
  • A Bézier Extrusion
Re: DesignCAD Theory of Parallel Visibility
« Reply #2 on: April 14, 2014, 08:34:54 AM »
Is this, what you want?

Thanks Magic, in the main view you moved the view center closer to the objects?  Yes?   Update, No, you switched to perspective mode.  So that doesn't test the hypothesis.

When I put the view center back to 0,0,0, in parallel mode in the main view I get the red object disappearing again.


edit: Just for information, programmatically I don't have a way of finding out in a view where the view center is.  So unless I set it, I can't tell where it is located.

« Last Edit: April 14, 2014, 09:19:13 AM by prl »

prl

  • Hero Member
  • *****
  • Posts: 3389
  • A Bézier Extrusion
Re: DesignCAD Theory of Parallel Visibility
« Reply #3 on: April 14, 2014, 10:39:38 AM »
In case it isn't apparent what the heck I'm driving at with this thread, there appears to be a blind spot in DesignCAD's parallel view when viewed head on and the object is beyond the distance limits of what I'm describing.

Example, you're driving down the road and the car in front of you gets to 1250 feet away and instantly disappears.  At 1250 feet you see it, at 1251 it is gone. That is what this topic is about.
« Last Edit: April 14, 2014, 10:41:42 AM by prl »

Dean

  • Sr. Member
  • ****
  • Posts: 284
Re: DesignCAD Theory of Parallel Visibility
« Reply #4 on: April 14, 2014, 10:46:00 AM »
Check this out maestro.        https://www.youtube.com/watch?v=etzVG85_Lkg
Also, if I set a workplane on the red solid face it renders.
Windows 7 64 Bit Home Premium
AMD Turion™ 11 Ultra Dual Core Mobile M600 (laptop)
2.40 GHz - 4GB
ATI Mobility Radeon HD 4500/5100 Series (display adapter)

prl

  • Hero Member
  • *****
  • Posts: 3389
  • A Bézier Extrusion
Re: DesignCAD Theory of Parallel Visibility
« Reply #5 on: April 14, 2014, 11:00:25 AM »
Check this out maestro.   

Thanks Dean for playing along.  I couldn't tell where you are setting the workplane but remember it isn't about fixing the view, it is about if anyone can create a file or drawing where if sys(32)=8 and the object is further than 1250 units from the view center, whether the object when viewed head on in parallel view mode will render.   I can easily fix this drawing/view, eg. move the view center to the blue object, but that isn't what I'm trying to demonstrate. 

The two things I'm trying to either validate or disprove are:

1.  In parallel view mode, in the front head on view, if you start moving the object in the z direction and at any distance greater than 1250 units it vanishes. 
2.  That I have determined the mathematical equation that tells me when it will vanish,  10,000/sys(32)

Edit:  Had to correct my 1. statement to anything greater than 1250 units.
« Last Edit: April 14, 2014, 01:51:52 PM by prl »

Dean

  • Sr. Member
  • ****
  • Posts: 284
Re: DesignCAD Theory of Parallel Visibility
« Reply #6 on: April 14, 2014, 11:35:47 AM »
This works for me. I created views. Check out my user defined views in the attached file. It's what I did in the video with your file.
Windows 7 64 Bit Home Premium
AMD Turion™ 11 Ultra Dual Core Mobile M600 (laptop)
2.40 GHz - 4GB
ATI Mobility Radeon HD 4500/5100 Series (display adapter)

prl

  • Hero Member
  • *****
  • Posts: 3389
  • A Bézier Extrusion
Re: DesignCAD Theory of Parallel Visibility
« Reply #7 on: April 14, 2014, 12:05:13 PM »
Great, thanks for creating your own version.

In your drawing, in the right window, move your blue cube to 1251.  Currently you are on the view range limit of 1250.  Then in that window run my vczero.d3m.  The blue cube should disappear.

prl

  • Hero Member
  • *****
  • Posts: 3389
  • A Bézier Extrusion
Re: DesignCAD Theory of Parallel Visibility
« Reply #8 on: April 14, 2014, 12:43:44 PM »
Dean, I don't know why I didn't do this earlier.  Let basiccad do the talking.

In your Test Shaded View drawing, erase your cubes and run the below routine in the right window.  Note when you are hitting the space bar, the blue cube is moving in the z direction.  The status bar will tell you the z value.  At z = 1260, it will vanish.

The reason I like your drawing, it is split screen, so you can watch the blue cube backing up in the left screen.



Code: [Select]
'Program: vanish.d3m

sys(541) = 0 'color by layer OFF

message "About to change to parallel front view with view center set at 0,0,0 in flat shaded mode"
sys(2) = 2
>ViewChange
{
  <Type 1
  <Angle 0, 0, 0
  <VRP 0, 0, 0
  <PRP 0, 0, 0
  }

>SetViewerPoints
{
<pointxyz [0,0,0]
}
sys(1)=0 
 
message "About to create two cubes, a blue one and a red one at z = 1000"

>box
{
 <color 255,0,0
 <pointxyz [0, 0, 1000]
 <pointxyz [20, 20, 1020]
}

>box
{
 <color 0,0,255
 <pointxyz [20, 0, 1000]
 <pointxyz [40, 20, 1020]
}

>fittowindow
{
}

>pointselect
{
 <pointxyz [40, 20, 1000]
}

message "About to MOVE the blue cube in the z direction 10 units at a time. Hit space bar to keep moving it."
z=1000
precision 0
for j=1 to 100
   z = z + 10
  >dragmove
  {
   <Pointxyz [40,20,z]
  }
     
   PRINT "Press space bar for additional moves, enter to end.  z = ", z
   anykey A
   if A=13 then End
next j


END
« Last Edit: April 14, 2014, 12:48:28 PM by prl »

Dean

  • Sr. Member
  • ****
  • Posts: 284
Re: DesignCAD Theory of Parallel Visibility
« Reply #9 on: April 14, 2014, 12:49:31 PM »
I moved the cube to 1251 and it still works, with my views. I ran your macro and the blue cube disappeared then I went to my custom views and it worked. I attached a newer file. I think my views were not saved in the previous file I posted. They should be in the attached file.i created a parallel view and a perspective view. Dacd's built-in "default' views have a limit. Creating your own views appears to work, that is, unless I'm not following you.

I haven't tested your recent macro..yet
« Last Edit: April 14, 2014, 12:52:54 PM by Dean »
Windows 7 64 Bit Home Premium
AMD Turion™ 11 Ultra Dual Core Mobile M600 (laptop)
2.40 GHz - 4GB
ATI Mobility Radeon HD 4500/5100 Series (display adapter)

prl

  • Hero Member
  • *****
  • Posts: 3389
  • A Bézier Extrusion
Re: DesignCAD Theory of Parallel Visibility
« Reply #10 on: April 14, 2014, 12:53:53 PM »
Creating your own views appears to work, that is, unless I'm not following you.

Sure, creating your own view creates a new view center for that view which happens to be closer to the object than 1250.

Aren't you curious why in parallel view the object disappears at 1251 if the view center is at 0,0,0?  We should be able to see the cube to z infinity. It should never disappear.

prl

  • Hero Member
  • *****
  • Posts: 3389
  • A Bézier Extrusion
Re: DesignCAD Theory of Parallel Visibility
« Reply #11 on: April 14, 2014, 01:07:45 PM »
Dean, thanks for providing your file.  I really like the split screen.  I created a movie in the zip file using the vanish macro (on my machine it is called test2.d3m).

Dean

  • Sr. Member
  • ****
  • Posts: 284
Re: DesignCAD Theory of Parallel Visibility
« Reply #12 on: April 14, 2014, 01:10:09 PM »
Ya dam right ;), I'm curious, that's why I created my own views. I set the custom view"z" coordinate at 625 in the parallel view. Can you write a macro whereas dcad’s “eye” adjusts to the distance? I’m doing it manually by creating a custom user defined view. Let Dcad do the math.. is it possible? If it is, you are the maestro!
In the real world we can only see so far unless we walk closer to the object...

I’ll keep testing.
Windows 7 64 Bit Home Premium
AMD Turion™ 11 Ultra Dual Core Mobile M600 (laptop)
2.40 GHz - 4GB
ATI Mobility Radeon HD 4500/5100 Series (display adapter)

prl

  • Hero Member
  • *****
  • Posts: 3389
  • A Bézier Extrusion
Re: DesignCAD Theory of Parallel Visibility
« Reply #13 on: April 14, 2014, 01:16:27 PM »
In the real world we can only see so far unless we walk closer to the object...

True, but in parallel viewing mode, as evidenced by the wire frame view of that same window, the two objects can be a million miles apart in the z direction, and you will still see them as if they are next to each other.  There is no vanishing point.  Granted we can blow up DesignCAD's internal precision, but 1250 isn't a big number.

This is a viewing bug that acts like AutoCAD's back and front clipping planes.  Not sure if you are familiar with those.

Dean

  • Sr. Member
  • ****
  • Posts: 284
Re: DesignCAD Theory of Parallel Visibility
« Reply #14 on: April 14, 2014, 03:13:47 PM »
It appears that the parallel"eyes" cut off point is at 0.5 in the "z".  @0.6 The cubes are visible
Windows 7 64 Bit Home Premium
AMD Turion™ 11 Ultra Dual Core Mobile M600 (laptop)
2.40 GHz - 4GB
ATI Mobility Radeon HD 4500/5100 Series (display adapter)